the default spawn position is set after CharacterAdded is called, overwriting manual spawning. I’m pretty sure this has always been the case. is this intentional? It is unintuitive and annoying. At what point is it safe to move the character?
I agree – this is abundantly annoying. The only “solution” I’ve found is that dumb wait fix:
game.Players.PlayerAdded:connect(function(player)
local function useSpawn(spawn)
wait()
player.Character:WaitForChild("Torso").CFrame = spawn.CFrame * CFrame.Angles(0,math.rad(90),0) + Vector3.new(0,(spawn.Size.Y/2)+3,0)
end
player.CharacterAdded:connect(function(character)
useSpawn(getBestSpawn())
end)
end)
It works for the most part, but I’ve still had people spawn out in the middle of nowhere because the ROBLOX spawn system hadn’t finished up with the character by the time my code ran.
Since spawning will set the CFrame property directly, the Changed event will fire. You could potentially just wait for that.
EDIT: Just checked into this. There’s a fix but it seems like there was an unrelated issue with it keeping it from being rolled out. I’ll see if there’s any update on it.