So I want to make a teleporter that teleports the player when they die. I should be able to do this, but I have no idea on how to store the dead player in a variable. I've tried googling it but nothing comes up related to my question, so I'm asking it here. Can anyone help?
Here is an example...This assumes you already have a Player and Start variable defined somewhere. Also you may need to change the workspace location for your needs. But since CharacterAdded fires on player respawn or player getting a new character, you don't necessarily need a Died event...Hope this is helpful!
Player.CharacterAdded:Connect(function(character) if start == false then print("They Shall Not Pass") character:WaitForChild("Torso").CFrame = CFrame.new(workspace.Lobby.Spawns.Part.Position) -- The wait for child is just in case of lag. end end)