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 make the code make the value go down instead of up?

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!

3 comments

0

Need to say what value, no value here is going up.

0

Oh, I forgot to specify and add more detail, sorry, I edited it and now it should be good.

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

1 answer

------------------------------------------------------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

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