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

Cant figure out how to change which way the player faces on spawn.?

So basically, I have this here code that I found online ---

local checkpoints = workspace:WaitForChild("Checkpoints") game.Players.PlayerAdded:Connect((function(plr) local leaderstats = Instance.new("Folder") leaderstats.Parent = plr local v = Instance.new("IntValue") v.Name = "Stage" v.Value = 0 v.Parent = leaderstats plr.CharacterAdded:Connect(function(char) local hum = char:WaitForChild("Humanoid") wait() char:MoveTo(checkpoints[v.Value].Position) hum.Touched:Connect(function(hit) if hit.Parent == checkpoints then if tonumber (hit.Name) == v.Value +1 then v.Value = v.Value +1 end end end) end) end))

Basically, it spawns the player/avatar facing backwards ---

https://gyazo.com/d904aea38b4df1aad0d0478d7a01773b

Does anyone know how to fix this, with CFrame maybe?

EDIT: Idk why the codes showing up like that, idk how to fix it. Sorry!

2 comments

0

i really dont know but have u tried rotating the spawn area

0

well, its a cylinder, so its kinda hard lol, but when I do rotate it, the player still spawns facing the same direction

1 answer

The player will always spawn facing the front of a part. To know which side is a front, I suggest adding a hinge to it.

Click here to see an image example.

(If you can't find the Surface category, just search "Stud Spawn" in the Toolbox.')

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