My goal is so when I spawn I die instantly.
local plr = game.Players.LocalPlayer
local Char = plr.Character
local Humanoid = Char.Humanoid
function yes()
Humanoid.Health = 0
end
yes()
My goal is so when I spawn I die instantly.
local plr = game.Players.LocalPlayer
local Char = plr.Character
local Humanoid = Char.Humanoid
function yes()
Humanoid.Health = 0
end
yes()
If you want the player to respawn instantly upon joining the game, then just put this code inside of a server script inside of workspace:
game.Players.PlayerAdded:connect(function(plr) --Player Added to the game
repeat wait() until plr.Character --Wait for our player to show up
local char = plr.Character
char:BreakJoints() --Reset the Player
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.