ive made a hunger script and whenever i eat something the value goes over 100 and i want the cap to be 100
You can do this easily with a simple script that goes something like this:
local hunger = script.Parent --change 'script.Parent' to your hunger value --if for some reason their hunger is above 100 when they join if hunger.Value > 100 then --if the value is over 100 then hunger.Value = 100 --changes the value to 100 end --fires when the player's hunger is changed and checks to see if its above 100 hunger.Changed:Connect(function() if hunger.Value > 100 then --if the value is over 100 then hunger.Value = 100 --changes the value to 100 end end)
local intValue = YourIntValue -- Put the path to your intValue If intValue.Value > 100 then intValue.Value = 100 end