Why do the gui dissapear after a click even though i want it to disappear after the value is bigger than 99

So basically im trying to make a fishing game with a minigame but the problem is that when i click the gui it dissapears instead of dissapearing when the value is biggger than 99

heres my code:

script.Parent.MouseButton1Click:Connect(function()
script.Parent.Value.Value += 5
if script.Parent.Value.Value <= 99 then
script.Parent.Parent.Enabled = false
end
end)

any help would be appreciated

if script.Parent.Value.Value > 99 then

I believe that you have this the wrong way around. Try using

if script.Parent.Value.Value > 99 then

instead

yeah like the others have said its

if script.Parent.Value.Value >= 99 then

also, you can format scripts like above by doing:

code here

just do three of each symbol ( the `) top and bottom and you’re done!

oh it actually works! thanks guys!