Error when trying to open GUI using a tool

So I am making a tool which opens a GUI. But it doesn’t seem to work at all.

local plr = game.Players.LocalPlayer

script.Parent.Equipped:Connect(function()

plr.PlayerGUI.Picker.Enabled = true

end)

script.Parent.Unequipped:Connect(function()

plr.PlayerGUI.Picker.Enabled = false

end)

Instead of PlayerGUI, write PlayerGui, with the “ui” in “Gui” lower cased.

1 Like

Doesn’t seem to work.

30characters

Is your code located in a LocalScript? I believe it should work if it is.

It is located in a LocalScript.

Does the output give you any errors?

Nothing is in the console.

30characters

What type of instance is ‘Picker’?

My GUI’s name.

30characterssss

Make sure Tool.RequiresHandle is not checked if your tool doesn’t have a handle. Your Equipped and Unequipped events won’t fire.

Tools are objects that a Humanoid object can equip. For players, they are stored in a Backpack object parented to a Player object. In-game, players may have multiple tools which appear as icons at the bottom of the screen. Equipping a tool moves it from the Backpack and into a player’s Character|character model in the Workspace . By default, tools are held in the right hand and have a handle in them, which is a Part named “Handle” inside (though one is not required if Tool.RequiresHandle is off). Tools that are to be provided to (re)spawning players ought to be stored in the StarterPack .

I mean, is Picker a Frame, a ScreenGui, etc