Hey everyone!
So, I've been doing some things, and I just can't break this bug.
Basically, in my game, players swim to gain points, which can be used to purchase boosters/buffs. However, when players swim for a while, this will happen:
For, let's say ten seconds, the points-per-second is normal, at 10. At 10 seconds and later, it will go up by a large amount each second.
My partner was AFKing in-game when he came back to see he'd made four million points. This is insanely large, and I don't want it to do that.
Script:
function Starter.GainWaterPoints(level)
local debounce = false
while script.Parent.InPool.Value == true do
if debounce == false then
game.Players:GetPlayerFromCharacter(script.Parent.Owner.Value).leaderstats["Water Points"].Value = (game.Players:GetPlayerFromCharacter(script.Parent.Owner.Value).leaderstats["Water Points"].Value + math.floor(game.ReplicatedStorage.WaterPointsSettings.WaterPointsPerSecond.Value * game.Players:GetPlayerFromCharacter(script.Parent.Owner.Value).HiddenStats.Boost.Value)) * level
debounce = true
wait(1)
debounce = false
end
wait(1)
end
end
Any help is appreciated!
Regards, MaximussDev.

2 comments
show your script bud
Sorry, I didn't even think of that.