Debounce changing faster than it should be?

so im making this simple script… so basically it checks if the enemy has been hit, and check the debounce on the script if its false… but for some reason, the debounce changes WAYY faster than it should be.

script.TimeStop.OnServerEvent:Connect(function(plr, v)
	if v:FindFirstChild("Stopped") == nil then
		if v.Name == plr.Name then return end
		print(timestopping) -- this prints out true????
		print(v)
		if timestopping == false then
				warn(timestopping) -- this doesn't happen
				
				local enemystopped = Instance.new("StringValue")
				enemystopped.Name = "Stopped"
				enemystopped.Parent = v
				
				v.HumanoidRootPart.Anchored = true
				timestopping = true -- its literally here :skull:
	end
end
end)

Can you show your explorer related to the script also show other script as well that’s related.

Did you set timestopping to false like that? -
local timestopping = false

2 Likes

Where is timestopping set before this section of script?

2 Likes

This print result indicates you prob defined “timestopping” as true and not as false.

Hello! I managed to fix this by… changing the TimeStop script to a new one, I still don’t know why the debounce changed faster though, Thank you all for your attempt to help!

It doesn’t look like your script yields at all so theoretically it would change the timestopping bool back to true instantly, which is as good as not having a debounce variable in the first place.

1 Like