I am making a button that whenever a player touches it with any of the both legs the button will go down 2 studs to give it a little effect, but I don't know where the problem is!
There's an activator part which has the script in it and it will cause the button go down 2 studs
part = script.Parent
button = script.Parent.Parent.Button.Button
part.Touched:connect(function(hit)
if hit.Name == "Left Leg" or "Right Leg" then
button.Position.Y = button.Position.Y - 2
end
end)

1 comment
button.CFrame = button.CFrame + Vector3.new(0, -2, 0) is a shorter way to say it