I'm pretty new to the scripting stuff i like building, i tried doing this myself but failed
Its supposed to make your health go down to 0 if the hunger value is 0.
And if your hunger is greater than 100 it will reset to 100 to prevent exploitation
while true do
wait(10)
script.Parent.Value = script.Parent.Value - 1
end
while true do
wait(1)
if script.Parent.Value >= 0 then
for i,v in pairs(game.Players.LocalPlayer) do
v.Character.Humanoid.Health = 0
end
end
while true do
wait(1)
if script.Parent.Value > 100 then
for i,v in pairs(script.Parent) do
v.Value = 100
end
end
end
end
Sorry for taking your time, please tell me if i made a stupid mistake

2 comments
what does the output say?
Nothing related to the script inside the value