The only thing I know on the :MoveTo() Method Is that it Can As in the name MoveTo Moves something To something, And It is needed for My game, here is the script.
function Killed() if v.Character.Humanoid.Health == 0 then v.Character.Humanoid.Health = 100 elseif v.Character.Humanoid.Health == 100 then v:MoveTo("SpawnLocation") end end end
1. v is nil. 2. If their health is 0, setting it to 100 will not do anything because they are already dead. 3. MoveTo() takes a Vector3 value, not a string value. 4. You have too many ends.
I'll assume you want to move then to a brick named spawn location each time someone dies. For this we can use a character added event.
game.Players.PlayerAdded:connect(function(plr) plr.CharacterAdded:connect(function(chr) chr:MoveTo(workspace.SpawnLocation.Position) end) end)