I have found scripts local scripts to move/ rotate a object/model, but I do not know how to make the script work. Can anyone help?
I don't think local scripts should do the job for you. A normal script should be fine.
Here, this should help you.
01 | local part = script.Parent |
02 |
03 | local start = part.CFrame * CFrame.new( 0 , 0 , 0 ) |
04 | local finish = part.CFrame * CFrame.new( 0 , 2 , 0 ) -- only edit these numbers |
05 | --if you want it to rotate instead of move, change "CFrame.new" to "CFrame.Angles" |
06 |
07 | -- over the course of 1 second, vary `progress` from `0` to `1` |
08 | for progress = 0 , 1 , 0.03 do --If you want it to loop, change the number one here to 2. Also add "while true do" before "for progress". |
09 | part.CFrame = start:lerp(finish, progress) --this makes the part move from the start to finish |
10 | wait() |
11 | end |