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

Why does an object teleport back?

Asked by 5 years ago
Edited 5 years ago

im making a game where theres rising lava and i try to have it so that the lava resets whenever a player dies. i successfully did that, but just for a split second and then it teleports back to the spot it was before i died. why does this happen and is there a way to fix it?

the script i used to do this is a local script and is in StarterPLayer and then StarterCharacterScripts. this is the code:game.Players.LocalPlayer.Character:WaitForChild('Humanoid').Died:connect(function() game.Workspace.Lava.Position = Vector3.new(10.72,0.5,-50.93) end)

0
Do you have another script that makes the lava rise? A loop in the other script could possibly be moving the lava back when you try to set its position. User#20279 0 — 5y

Answer this question