game.Players.PlayerAdded:Connect(function() game.Workspace:WaitForChild(game.Players.LocalPlayer.Name) wait(.1) game.Players.LocalPlayer.Character.Torso.CFrame = game.Workspace[game.Players.LocalPlayer.leaderstats.Stage.Value].CC.CFrame end)
When i tested it in my obby, when i spawned in i didn't teleport to for example stage 0 when i just join, instead i just spawn high up in the middle of the baseplate. But when resetting i spawn on the checkpoint (stage).
This is a localscript inside workspace, im really confused how this isn't working. Already have everything else setup like stages, teleport to them when they die/respawn.
If its a localscript then this will do:
local player = game.Players.LocalPlayer repeat wait() until player.Character ~= nil local character = player.Character wait(.1) character.Torso.CFrame = game.Workspace:FindFirstChild(player.leaderstats.Stage.Value).CC.CFrame
If you want it in a serverscript, just do this:
game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) wait(.1) character.Torso.CFrame game.Workspace:FindFirstChild(player.leaderstats.Stage.Value).CC.CFrame end) end)
Tell me if these helped!