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

Excluding my "end" problems whats the issues with this script?

Asked by 4 years ago
Edited 4 years ago

I already know that my ends on my script are misplaced, the script isn't working regardless.

remote.OnServerEvent:Connect(function(player)
        if usingPower == false then 
            usingPower = true
            ifMaster(player)
                while usingPower == true do 
                    Endurance = Endurance - 1
                    wait(1)
                        if Endurance == 0 then
                            break 
                        end
                    end
        elseif usingPower == true then
            usingPower = false
            unMaster(player)
            end
        end

My ifMaster(player) and unMaster(player) I confirmed to work. its this specific script that the issue comes from. It does operate the ifMaster(player) function, but the usingPower value is not updated.

0
you never defined 'usingPower' Nistrict 44 — 4y
0
That was inferred Feroxidus 83 — 4y
0
besides if I had never defined usingPower the first line would not have worked as it would have returned as nil Feroxidus 83 — 4y

Answer this question