I'm trying to make some stuff this will help a lot. thanks.
basically i need to have a script that when i go onto a part, it changes its color to red for a small amount of time, and then reverts back to its original (green) color. thank you so much.
I'm trying to make some stuff this will help a lot. thanks.
basically i need to have a script that when i go onto a part, it changes its color to red for a small amount of time, and then reverts back to its original (green) color. thank you so much.
Part = script.Parent -- Change this to the brick you want affected. This will also be the brick that fires the fucntion if touched.
Part.Touched:connect(function(Hit)
Part.BrickColor = BrickColor.new("Bright red")
wait(5) -- Time before changing back.
Part.BrickColor = BrickColor.new("Bright green")
end)
This will also activate if any other brick touches it. However,
Part = script.Parent -- Change this to the brick you want affected. This will also be the brick that fires the fucntion if touched.
Part.Touched:connect(function(Hit)
if Hit.Parent.Humanoid ~= nil then -- Makes sure the thing that hits it is a player, or human and not a part.
Part.BrickColor = BrickColor.new("Bright red")
wait(5) -- Time before changing back.
Part.BrickColor = BrickColor.new("Bright green")
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
Worked perfectly :D thanks for your help!