Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by
Klamman 220 Moderation Voter
8 years ago
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.

0
Move the whole model lucas4114 607 — 8y
0
Thanks! That works well! @lucas4114 Klamman 220 — 8y

2 answers

Log in to vote
0
Answered by 8 years ago

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.

Ad
Log in to vote
0
Answered by 8 years ago

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

Answer this question