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

How do I check variables with "while true do" in a module script?

The script below doesn't work. How do I improve it?

local Module = require(game.ReplicatedStorage.ModuleScript)

while true do
	wait()
	if Module.var == 1 then
		while true do
			wait(2)
			Module.var2 = Module.var2 + 100
		end	
	end
end

2 comments

0

What do you mean by check variables?

0

like if a variable equals 4 then do something

1 answer

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