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

How do you make a model go back to its start position?

Asked by 4 years ago
Edited 4 years ago

So I am making a game where I want parts to go back to their starting position. I dont have any code because I dont know how to make it. Could you help?

This is not helping there are 2 dice in the model

3 answers

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago
local Pos = game.Workspace.Model.PrimaryPart.Position

game.Workspace.Model:MoveTo(Vector3.new(10,10,10))
game.Workspace.Model.PrimaryPart:GetPropertyChangedSignal("Anchored"):Connect(function()
    game.Workspace.Model:MoveTo(Vector3.new(Pos))
end)
0
Ok lets see if it works Ultim8creeper 15 — 4y
Ad
Log in to vote
0
Answered by 4 years ago

Wait but I want this script to run after the cubes unanchor

0
now try BradNewTypical 232 — 4y
Log in to vote
0
Answered by 4 years ago
Edited 4 years ago
model.PrimaryPart:GetPropertyChangedSignal("Anchored"):Connect(funcion()
    if model.PrimaryPart.Anchored == false then
        --code
    end
end)
0
K ill try it Ultim8creeper 15 — 4y
0
the if is an error Ultim8creeper 15 — 4y

Answer this question