I should be spawning on that island, where the current selected object is. My character currently spawns in mid air at 0,0,0. The platform I’m standing on is purely there to prevent the player from constantly falling through the world.
I don’t want to use SpawnLocations as they result in other players spawning on your island etc.
local RunService = game:GetService("RunService")
-- Wait a brief moment before teleporting, as Roblox will teleport the
-- player to their designated SpawnLocation (which we will override)
RunService.Stepped:wait()
I also tested within studio should work, even a normal wait() works.
To debug add a CFrame changed property, it’ll see where and when the character has been teleported by the roblox spawn system or any other system:
local RunService = game:GetService("RunService")
local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
character.HumanoidRootPart:GetPropertyChangedSignal("CFrame"):Connect(function()
print(player, " has teleported here:",character.HumanoidRootPart.Position)
end)
player.CharacterAppearanceLoaded:Wait()
--wait()
RunService.Stepped:wait()
print("LOADED")
character:SetPrimaryPartCFrame(workspace.NewSpawnPart.CFrame + Vector3.new(0, 2, 0))
end)
end)