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

How do I make the code make the value go down instead of up?

Asked by 2 years ago
Edited 2 years ago

So, I'm making a game where basically you click a gui and it's Cframe changes while accuracy adds by 1 and if you miss then click value adds by 1 and accuracy divides by click value. Then I divide them to calculate the accuracy of the player but when I run the code the accuracy goes up even though it's supposed to divide the accuracy value. Things you need to know: - the values are displayed on a gui label. - accuracy value is set to 100. - click value is set to 0

local debouce = true
local accuracy = game.StarterGui.ScreenGui.AccuracyScoreValue
local clicks = game.StarterGui.ScreenGui.clicksScoreValue
while script.Parent.PlayButton.Visible == false do
    if script.Parent.PlayButton.Visible == false then
        accuracy.Value /= clicks.Value
        if accuracy.Value >= 100 then
            accuracy.Value = 100
        end
    else
        accuracy.Value = 100
        clicks.Value  = 0
    end

end

Thank you!

0
Need to say what value, no value here is going up. LeoPlaysGames_RBX 26 — 2y
0
Oh, I forgot to specify and add more detail, sorry, I edited it and now it should be good. fire_yusuf 0 — 2y
0
------------------------------------------------------EDIT------------------------------------------------ THE GAME IS NO LONGER BEING WORKED ON AND I WILL NO LONGER BE FOLLOWING UP WITH THIS POST!!!! I AM MAKING A REMAKE OF THIS GAME BECAUSE OF THE FOLLOWING REASONS. - didn't turn out how I wanted to - too buggy - making a remake of this game fire_yusuf 0 — 2y

1 answer

Log in to vote
0
Answered by 2 years ago
Edited 2 years ago

------------------------------------------------------EDIT------------------------------------------------ THE GAME IS NO LONGER BEING WORKED ON AND I WILL NO LONGER BE FOLLOWING UP WITH THIS POST!!!! I AM MAKING A REMAKE OF THIS GAME BECAUSE OF THE FOLLOWING REASONS

  • didn't turn out how I wanted to
  • too buggy
  • making a remake of this game
Ad

Answer this question