How do I make a box just a 5,5,5 part and when the part slides onto the part(the button) it becomes green and it gets pushed down, but it player pushes the part off the button it goes up and the button becomes red. But when the block is on the button. a door opens. but if not on button doesnt open.
COMMUNITY QUESTION
Part touch button instead of player touch button?
1 answer
script.Parent.Touched:connect(function(part)
if part.Name == "Box" then
--It touched the part and it is the box
script.Parent.BrickColor = BrickColor.new("Really red")
else
--it touched the part and it isn't the box
script.Parent.BrickColor = BrickColor.new("Lime green")
end
end)
You need to add some special to the box like name it "Box" or have something to define it
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Oops just noticed i got colors wrong