When the script first runs the player and the spawn points pivots are the same but shortly after the players pivot resets to the default spawn point
local function SpawnPlayer(player)
local spawnPoint = spawnPoints[math.random(1, #spawnPoints)]
local character = player.Character
for _, part in pairs(character:GetDescendants()) do -- fade in
if part:IsA("BasePart") and part.Name ~= "HumanoidRootPart" and part.Name ~= "CollisionPart" then
part.Transparency = 1
TweenService:Create(part, TweenInfo.new(.5), {Transparency = 0}):Play()
end
end
character:PivotTo(spawnPoint:GetPivot() + Vector3.new(0, 0, 5))
print(spawnPoint:GetPivot())
print(character:GetPivot())
print("spawned in")
task.wait(2)
print(character:GetPivot())
end
17:38:44.684 -31.087265, 6, -26.4034042, 1, 0, 0, 0, 1, 0, 0, 0, 1 - Server - StartupHandler:30
17:38:44.684 -31.087265, 6, -21.4034042, 1.00000191, -2.98023757e-08, 1.19209389e-07, -2.98023757e-08, 1.00000191, -2.98023508e-08, 1.19209389e-07, -2.98023508e-08, 1 - Server - StartupHandler:31
17:38:44.684 spawned in - Server - StartupHandler:32
17:38:46.690 -98.9897919, -144.357666, 57.0750885, 1, 0, 0, 0, 1, 0, 0, 0, 1 - Server - StartupHandler:35