I am trying to avoid using StarterCharacterScripts and trying to restart a local script once the player has died. How would I achieve this?
Script:
myHuman.Died:Connect(function()
attemptingToStop = true
wait(5.05)
print("ight ima try to reload the character")
character = player.Character or player.CharacterAdded:Wait()
end)
local Players = game:GetService("Players")
local client = Players.LocalPlayer
local character
client.CharacterAdded:Connect(function(_character)
character = _character
character.Humanoid.Died:Connect(function()
-- stuff
end)
end)
Although, why don’t you want to use StarterCharacterScripts?
I was trying to avoid StarterCharacterScripts because I wanted to gain information through a different script, aka the main localscript for my game to keep it simple.