Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

My if then statement has an error?

Asked by 1 year ago

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
0
give us a screenshot of the explroer WINDOWS10XPRO 438 — 1y
0
NEVER MIND GUYS, for some reason when i change the wait time to 1.5 it works. I know, kinda wierd. HKG_7551 -2 — 1y
0
put [SOLVED] at the title T3_MasterGamer 2189 — 1y

Answer this question