Also can you help me with this? It goes over 100 and I used your script, hunger works and it doesnt go over 100 but when I test thirst it goes. That’s the script.
local Plr = game.Players.LocalPlayer
repeat wait() until Plr.Character
local Hum = Plr.Character:WaitForChild(“Humanoid”)
local MaxThirst = 100
local DecreaseRate = 45
local ThirstValue
if Plr:FindFirstChild(“ThirstVal”) then
ThiarstValue = Plr.ThirstVal
ThirstValue.Value = MaxThirst
else
Instance.new(“IntValue”, Plr).Name = “ThirstVal”
Plr.ThirstVal.Value = MaxThirst
ThirstValue = Plr.ThirstVal
end
ThirstValue.Changed:Connect(function()
wait()
script.Parent.Thirst.UIGradient1.Offset = Vector2.new(0,-Plr.ThirstVal.Value / 100)
wait()
script.Parent.Thirst.UIGradient2.Offset = Vector2.new(0,-Plr.ThirstVal.Value / 100)
wait()
script.ParentThirst.UIGradient3.Offset = Vector2.new(0,-Plr.ThirstVal.Value / 100)
wait()
if Plr.ThirstVal.Value > 50 then
script.Parent.Thirst.UIGradient1.Enabled = true
script.Parent.Thirst.UIGradient2.Enabled = false
script.Parent.Thirst.UIGradient3.Enabled = false
end
if Plr.ThirstVal.Value <= 50 then
script.Parent.Thirst.UIGradient1.Enabled = false
script.Parent.Thirst.UIGradient2.Enabled = true
script.Parent.Thirst.UIGradient3.Enabled = false
end
if Plr.ThirstVal.Value <= 25 then
script.Parent.Thirst.UIGradient1.Enabled = false
script.Parent.Thirst.UIGradient2.Enabled = false
script.Parent.Thirst.UIGradient3.Enabled = true
end
if Plr.ThirstVal.Value >= 100 then
Plr.ThirstVal.Value = 100
end
end)
while wait(DecreaseRate) do
if ThirstValue.Value - 1 >= 0 then
ThirstValue.Value = ThirstValue.Value - 1
end
if ThirstValue.Value == 0 then
repeat wait(1)
Hum.Health = Hum.Health - 1000
until ThirstValue.Value > 0 or Hum.Health <= 0
end
Using the same solution (setting thirst value to 100 on the server instead of client) may work. It looks like you are still doing it on the local script