Part.Touchedlocal part = script.Parent
part.Touched:Connect(function(hit)
local character = hit.Parent
local humanoid = character:FindFirstChild("Humanoid")
if humanoid then
part.BrickColor = BrickColor.Random()
end
end)part.BrickColor = BrickColor.new("Bright red")part.Color = Color3.fromRGB(255, 0, 0)local part = script.Parent
local debounce = false
part.Touched:Connect(function(hit)
if debounce then return end
local humanoid = hit.Parent:FindFirstChild("Humanoid")
if humanoid then
debounce = true
part.Color = Color3.fromRGB(0, 255, 0)
wait(1)
debounce = false
end
end)local TweenService = game:GetService("TweenService")
local part = script.Parent
part.Touched:Connect(function(hit)
local humanoid = hit.Parent:FindFirstChild("Humanoid")
if humanoid then
local tween = TweenService:Create(part, TweenInfo.new(1), {
Color = Color3.fromRGB(0, 0, 255)
})
tween:Play()
end
end)local originalColor = part.Color
part.Touched:Connect(function(hit)
local humanoid = hit.Parent:FindFirstChild("Humanoid")
if humanoid then
part.Color = Color3.fromRGB(255, 0, 0)
wait(2)
part.Color = originalColor
end
end)