
4.1k Views
596 Executions
Respawn where you die
Universal Script 📌
mzeenFirst script
2 years ago
Please login to perform these actions:Does it work?
No reports yetNo reports yet. Tried it? Be the first to say.
Also noticed:
Description
Respawn where you die
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local deathPosition = nil
local function onCharacterDied()
local character = player.Character
if character and character:FindFirstChild("HumanoidRootPart") then
deathPosition = character.HumanoidRootPart.Position
end
end
local function onCharacterAdded(character)
local humanoid = character:WaitForChild("Humanoid")
humanoid.Died:Connect(onCharacterDied)
if deathPosition then
local hrp = character:WaitForChild("HumanoidRootPart")
hrp.CFrame = CFrame.new(deathPosition + Vector3.new(0, 5, 0))
end
end
player.CharacterAdded:Connect(onCharacterAdded)
if player.Character then
onCharacterAdded(player.Character)
end
Comments
0Log in to join the conversation. Login
No comments yet. Be the first!







