Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to change brick color after player has stepped off?

This is what I have for my script:

script.Parent.Touched:Connect(function() script.Parent.Color = Color3.new (255/255,0/255,0/255) end)

When a player steps on it. The button turns from Green to red.

But can't figure out how to do the opposite when a player steps off to change from Red to Green.

1 answer

✓ Accepted answer

Hello, owenm00!

You can use TouchEnded for this

script.Parent.TouchEnded:Connect(function() 
	script.Parent.Color = Color3.new (255/255,0/255,0/255) 
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.