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

How do you make Billboard Guis enabled depending on Player's Backpacks?

Asked by 10 years ago

Hey, people! I'm trying to make a Billboard Gui that becomes enabled if a certain tool named HackPhone is inside a Player's Backpack and un-enabled if it's not. The following Localscript is inside an Image Button inside the Billboard Gui. Can anyone tell me what the problem is? Thank you!

local Player = game.Players.LocalPlayer
while true do
    phone = Player.Backpack:FindFirstChild("HackPhone")
    if phone then
    script.Parent.Visible = true
    else
    script.Parent.Visible = false
    end
end

1 answer

Log in to vote
0
Answered by 10 years ago

So far all you're doing is telling the script inside the button, that if the phone is there, enable the GUI. You aren't telling it to connect to the phone in any way. Hope I helped.

Ad

Answer this question