Players not spawning in correct place after respawning?
1 | game:GetService( "Players" ).PlayerAdded:Connect( function (plr) |
2 | plr.CharacterAdded:Connect( function (char) |
3 | char:FindFirstChild( "HumanoidRootPart" ).CFrame = SpawnValues [ math.random( 1 , #SpawnValues) ] |
(SpawnValues is a table with the cframes of certain parts I want the player to spawn at)
This script works fine in roblox studio, but in game it doesn't work? I don't want to use a spawnlocation part since I want the player when they join to spawn in the lobby, then later for them to spawn somewhere else.