So I'm trying to set a bool value inside the player to false whenever they die, but for some reason, the script is not working.
The Script (Client-Side)
local Player = game:GetService("Players").LocalPlayer
Player.Character.Humanoid.Died:Connect(function()
Player:WaitForChild("Survived").Value = false -- Set the bool value to false
end)
The output also doesn't return any errors.
If you have any ideas on how I can get this working, please let me know because this function is really important for my game.
Thanks!

4 comments
Thanks for the reply! I'll let you know if it worked.
An error pops up saying attempt to index nil with ''WaitForChild". Removing the "WaitForChild" also causes an error. Very strange..
Hm? Could you possibly dm me on discord about this @15BQT?
My user is Shade#7482