I want my script to respawn players 1 second after they died and make them spawn where they died.
I made the wait part however, Now just the spawn part.
CFrames and positions are soo weird.
Can you PLEASE help me?
local respawnDelay = 1
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
character:WaitForChild("Humanoid").Died:Connect(function()
local lastPos = character:FindFirstChild("HumanoidRootPart").CFrame + Vector3.new(0,6,0)
wait(respawnDelay)
if player.Parent then
if lastPos then
character.HumanoidRootPart.CFrame = lastPos
end
player:LoadCharacter()
end
end)
end)
player:LoadCharacter()
end)

2 comments
Try positioning them after you load their character instead of before
@cowsoncows did not work