How do i make an On-Death teleport, I have some free ones, but none of them work. I want to have it so when Player is killed, He/She is teleported to the lobby that I have, here is one that i have.
function PwntX_X()
local tag = Humanoid:findFirstChild("creator")
if tag ~= nil then
if tag.Value ~= nil then
local Player = tag.Value
if Player ~= nil then
Player.Character.Torso.CFrame = CFrame.new(4699, 809, -134)
end
end
end
end
Humanoid.Died:connect(PwntX_X)~~~~~~~~~~~~~~~~~

2 comments
Please edit your post. Put all you code in a code block, that is, click the little blue Lua symbol and put your code between the squiggly lines it creates.
The squiggly lines must be on their own line, that is, ~~~~~~~ (NEW LINE) --[[code]]-- (NEW LINE) ~~~~~~