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

How would i make a opening and closing gate with a button?

Trying to make a big stone gate so when you press a green button both sides of the gate retract so you can walk through like a automatic door. Then you can press the red button to shut them again to let the cycle continue. The problem is i tried using cframe with the click detectors but it was quickly teleporting the walls instantly to the other sides as i wanted a smooth opening. The other times it just broke when i wanted it to close. Any help or suggestions would be great!!

3 answers

Try using a for loop moving the door a little bit at a time.


for i = 0, 100, 1 do
	--move the door .1 stud
end

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