TakeDamage on loop does more damage than expected

So i have a molotov script that damages the player for 3 health every 1 second however it seems to be doing much more damage for some reason, any ideas on how i can fix this?

while __CHARSTATS:WaitForChild("__BURNING").Value == true do
		task.wait(1)
		__CHARSTATS:WaitForChild("__BURNING"):WaitForChild("__BURNINGTIME").Value -= 1
		Humanoid:TakeDamage(3)
		if __CHARSTATS:WaitForChild("__BURNING"):WaitForChild("__BURNINGTIME").Value <= 0 then
			__CHARSTATS:WaitForChild("__BURNING").Value = false
			Burn:Stop()
			break
		end
	end

Try checking if the ā€œ__BURNINGTIMEā€ value is going down faster than usual

1 Like

I just used your script in a baseplate and replaced __CHARSTATS with Values and I didnā€™t face your problem. Would you mind sending the whole script?

1 Like

Turns out the problem was the script wasnā€™t checking if the player is already burning (true), so the while loop would run twice or even more.

1 Like