Setting Player.RespawnLocation and then calling Player:LoadCharacter() does not respect the RespawnLocation set.
This is bad because then I have to manually teleport the player to the given spawn location, searching for a location to spawn, instead of letting Roblox handle it.
Repo steps.
- Open up a new place
- Add a new SpawnLocation
- Position SpawnLocation away from origin. This is the default location to load a character.
- Make the SpawnLocation disabled (so we don’t auto-spawn there)
- Disable auto player loading in Players
- Make a server script that does the following
local Players = game:GetService("Players")
local Workspace = game:GetService("Workspace")
wait(5) -- Let client load, this is a hack
for _, player in pairs(Players:GetPlayers()) do
player.RespawnLocation = Workspace.SpawnLocation
player:LoadCharacter()
end
Expected result: Player’s character loads at the given location
Actual result: Player’s character does not load at the spawn location, instead loads at origin.
Minor note: I’m suffering from another bug which prevents me from logging into Roblox studio. I haven’t been able to test these specific repo steps. If they do not work, post here and I’ll update the instructions.