Hello, I am trying to make a boolvalue, so that when a player dies it turns off. Can you fix this script that I made?
h = script.Parent:FindFirstChild("Humanoid")
if h then
player = game.Players:GetPlayerFromCharacter(script.Parent.Parent)
if player then
x = player:WaitForChild("Ingame")
h.Died:connect(function()
x.Value = false
end)
end
end
