Why won't the GUI change when the IntValue equals a number?
Asked by
4 years ago Edited 4 years ago
I'm using a LocalScript to change a Player's GUI if an IntValue in a Player equals a number.
The point of the script is to make a GUI visible if a player has more than 0 of an item. My script is:
1 | player = game.Players.LocalPlayer |
2 | watermelonvalue = player.Inventory.Seeds.Watermelon.Value |
4 | if watermelonvalue > = 1 then |
5 | print ( "Watermelonvalue was true" ) |
6 | script.Parent.Visible = true |
7 | elseif watermelonvalue = = 0 then |
8 | script.Parent.Visible = false |
The script shows the GUI if the IntValue is 1 or greater but if I change the value in the server the GUI doesn't change when the value is 0.