My if then statement dosen't run. i checked in the cilent shell and the if then statement is true, just dosen't run. I don't know why this is happening. I also added a print to see if it really dosen't run, and the print never executed. Please help. Thanks.

LOCALSCRIPT

local db = true


while true do
	wait()
	if script.Parent.fins.Value ~= 0 and db then -- this statement dosen't work.
		print("If then works. The following script probably dosen't work.")
		game.Players.LocalPlayer.leaderstats.Money.Value += 2 * script.Parent.Rate.Value
		script.Parent.fins.Value -= 2 * script.Parent.Rate.Value
		if script.Parent.fins.Value < 0 then
			game.Players.LocalPlayer.leaderstats.Money.Value += script.Parent.fins.Value
			script.Parent.fins.Value = 0
		end
		db = false
		wait(1.5)
		db = true
	end
end

3 comments

0

give us a screenshot of the explroer

0

NEVER MIND GUYS, for some reason when i change the wait time to 1.5 it works. I know, kinda wierd.

0

put [SOLVED] at the title