Is there a way to stop players from auto magically responding once their health hits 0 is this possible?
COMMUNITY QUESTION
Player auto loads?
1 answer
Yes, look at CharacterAutoLoads
Example code from the page:
local respawnTime = 5
local Players = Game:GetService("Players")
Players.CharacterAutoLoads = false
Players.PlayerAdded:connect(function(Player)
Player.CharacterAdded:connect(function(Character)
-- find the humanoid, and detect when it dies
local Humanoid = Character:FindFirstChild("Humanoid")
if Humanoid then
Humanoid.Died:connect(function()
-- delay, then respawn the character
wait(respawnTime)
Player:LoadCharacter()
end)
end
end)
Player:LoadCharacter() -- load the character for the first time
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
