Im making an elevator and i have the model but when it isnt anchored it breaks apart so i need it to be anchored! How would i make it move up for say five seconds and move down for five seconds if it is still anchored!
Thanks for you help! -_-
You can use TranslateBy()
to shift a model using a given offset.
So in your case, it would look something like this:
local Model = script.Parent for i = 1, 60, 0.1 do -- Goes from 1 to 60 (incremented by 0.1) Model:TranslateBy(Vector3.new(0, 1, 0)) -- Moves the model 1 stud upward wait() end for i = 60, 1, -0.1 do -- Goes from 60 to 1 (incremented by -0.1) Model:TranslateBy(Vector3.new(0, -1, 0)) -- Moves the model 1 stud downward wait() end
Please mark as best answer if this worked!