Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

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)

1 comment

0

Ok lets see if it works

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

1 comment

0

now try

model.PrimaryPart:GetPropertyChangedSignal("Anchored"):Connect(funcion()
	if model.PrimaryPart.Anchored == false then
		--code
	end
end)

2 comments

0

K ill try it

0

the if is an error

This discussion is preserved as it was. New answers, comments, and votes are closed.