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 5 years ago
Edited 5 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 5 years ago
Edited 5 years ago
1local Pos = game.Workspace.Model.PrimaryPart.Position
2 
3game.Workspace.Model:MoveTo(Vector3.new(10,10,10))
4game.Workspace.Model.PrimaryPart:GetPropertyChangedSignal("Anchored"):Connect(function()
5    game.Workspace.Model:MoveTo(Vector3.new(Pos))
6end)
0
Ok lets see if it works Ultim8creeper 15 — 5y
Ad
Log in to vote
0
Answered by 5 years ago

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

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

Answer this question