In my game, I want it to be so that once a player dies, he waits 1 second and comes back alive on the same spot he died. Please help me.
COMMUNITY QUESTION
How to add a specific death?
1 answer
First you need to get ahold of the player. Often times we do it on entry.
game.Players.PlayerAdded:Connect(function(Plr) --Plr is our Player that joined
-- Checks for the specific player (In this case, by name)
if Plr.Name == "turbomegapower12345" then
--This is for when the specific player above dies
Plr.Character.Humanoid.Died:Connect(function()
local PositionTable = {} -- Creates a table to hold the players positon
--Adds the cahracters positon to the table
table.insert(PositionTable, Plr.Character.HumanoidRootPart.Position)
wait(1)
Plr:LoadCharacter() -- Revives the player
--Positions the player at the spot that he died
Plr.Character.HumanoidRootPart.CFrame = CFrame.new(PositionTable[1])
end)
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Oh, thanks so much, this really helped