Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to check a IntValue properly?

module.Dropper = function(timePerDrop,maxSpawn)
	print("Function Called")
	while wait(timePerDrop) do
		print("Looping wait(timePerDrop)")
		if workspace.CashblockCount.Value < maxSpawn then
			print("Cashblock.Value < maxSpawn")
			workspace.CashblocCount.Value += 1
		end
		break
	end
end

"Cashblock>Value < maxSpawn" stops printing after the IntValue reaches maxSpawn (10), but it does not resume after reducing IntValue, how can I fix that?

6 comments

0

You told it to break out of the loop lmao. Remove line 8.

0

No, it didn't work even without break

0

which lines print?

0

You have to update it every time the CashblockCount.Value changes, even if the value changes its not gonna update the script.

0

And print the CashblockCount's value

0

The script requring the module actually does a while true loop

1 answer

✓ Accepted answer

Maybe If IntValue.Value = 0 then

1 comment

0

The value will be increasing everytime I run the loop

This discussion is preserved as it was. New answers, comments, and votes are closed.