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
1 | local Pos = game.Workspace.Model.PrimaryPart.Position |
2 |
3 | game.Workspace.Model:MoveTo(Vector 3. new( 10 , 10 , 10 )) |
4 | game.Workspace.Model.PrimaryPart:GetPropertyChangedSignal( "Anchored" ):Connect( function () |
5 | game.Workspace.Model:MoveTo(Vector 3. new(Pos)) |
6 | end ) |
Wait but I want this script to run after the cubes unanchor
1 | model.PrimaryPart:GetPropertyChangedSignal( "Anchored" ):Connect(funcion() |
2 | if model.PrimaryPart.Anchored = = false then |
3 | --code |
4 | end |
5 | end ) |