game:GetService("Players").PlayerAdded:Connect(function(plr) plr.CharacterAdded:Connect(function(char) char:FindFirstChild("HumanoidRootPart").CFrame = SpawnValues[math.random(1, #SpawnValues)] end) end)
(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.
It is because the humanoidrootpart has wrong CFrame. I am not ENTIRELY sure of that...but I think that is the reason.