Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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?

2 comments

0

change == to <=, the coin can skip by 2 and bypass coinlimit making it go on with no limit

0

Changing == to <= didn't work, it still only pops up once.

2 answers

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.

1 comment

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.

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.

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