When Hunger OR Thirst gets to 0 it should start to damage the player When they get to zero it does absolutely nothing.
local player = game:GetService("Players").LocalPlayer
dying = false
if player.Character ~= nil then
player.Character:WaitForChild("Humanoid").Changed:Connect(function(prop)
if prop == "Health" then
player:WaitForChild("Health").Value = player.Character:WaitForChild("Humanoid").Health
end
end)
end
if player:WaitForChild("Hunger").Value == 0 or player:WaitForChild("Thirst").Value == 0 then
dying = true
end
player.Character.Humanoid.Died:Connect(function()
player:WaitForChild("Hunger").Value = 100
player:WaitForChild("Thirst").Value = 100
end)
while dying do
player.Character.Humanoid.Health = player.Character.Humanoid.Health - 15
wait(1.5)
end

10 comments
Don't worry about the top part about health..
lmao "while dying do"
What's so funny about that? Lol
is this a local script located in the charcter or starterpack?
make sure it's a localscript and located in starterpack
then just make player = script.Parent
and remove all ".Character"
you also dont need the "if player.Character ~= nil then"
Why would I remove .Character? I need to access the character to access the humanoid object.
And if I were to replace the player with script.Parent it would be the character model. Which isn't what I need. I have these values stored in the player object, not the character.