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

How do I make elevator buttons stay with the elevator as it moves up?

f1.ClickDetector.MouseClick:connect(function()
	repeat	
	base.CFrame = base.CFrame + Vector3.new(0, .1, 0)
	wait()
	until base.Position.Y >= 26.5
end)

So that's the code for one button that moves the elevator up. However, I've tried welding, but CFrame seems to bypass welds. How can I keep the elevator buttons with the elevator as it moves up? Thanks in advance.

2 comments

0

Move the whole model

0

Thanks! That works well! @lucas4114

2 answers

✓ Accepted answer

Just some more tips for future reference: Make sure the buttons are in contact with the surface (pressed all the way against the surface) and are welded to it. You can also group it together with the rest of the model and that may help. I hope these tips are helpful.

Another solution you can do is using BodyPosition to move the Elevator up and down. If done right it'll also move more smoothly.

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