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

Why is the 'InventoryFull' GUI only popping up once?

Asked by 3 years ago
Edited 3 years ago

I'm a new scripter, and not that good yet. I'm working on a simulator game, and I have a backpack full GUI. However, the GUI only shows up once and then doesn't show up again. Everything else is working.

Here's the script which makes the GUI visible:

elseif coins.Value == coinlimit then
        player.PlayerGui.ScreenGui.InventoryFull.Visible = true
    end
end)

And here's the script of the X button on the GUI which makes it invisible (this is a local script):

script.Parent.MouseButton1Click:Connect(function()
    game.Players.LocalPlayer.PlayerGui.ScreenGui.InventoryFull.Visible = false
end)

How do I make the GUI show up every time the amount of coins someone has collected reaches the coin limit value?

0
change == to <=, the coin can skip by 2 and bypass coinlimit making it go on with no limit greatneil80 2647 — 3y
0
Changing == to <= didn't work, it still only pops up once. PusheenicornGamerz 2 — 3y

2 answers

Log in to vote
0
Answered by 3 years ago

You would need to make it so it turns invis again from the same type of script that you used to make it visible? also make it if coins.Value >= coinlimit then and make sure this runs whenever you pick up a coin.

0
I made it turn invisible using an 'x' button on the InventoryFull GUI. Everything else I've made sure of and it's still not working. PusheenicornGamerz 2 — 3y
Ad
Log in to vote
0
Answered by 3 years ago

I found a solution, it turns out the server still thought the frame was visible. I fixed it by firing a remote event to the server when the X button was clicked/pressed. Then set the frame's visibility to false on the server's side.

Answer this question