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

How to make a GUI appear when a tool is equipped?

Asked by 4 years ago

If anyone can please help me I would be so thankful.

0
If you have not read the community guidelines already, please review them because it clearly states you shouldnt post requests for scripts rower86 35 — 4y

1 answer

Log in to vote
0
Answered by
LuaDLL 253 Moderation Voter
4 years ago

just something quick i put together don't know if this is what you are exactly looking for.

local Player = game.Players.LocalPlayer -- Gets The Local Player
local Backpack = Player:WaitForChild("Backpack") -- Waits For The Instance "Backpack" Inside Of Player
local Tool = Backpack.ToolNameHere -- Put Your Tool Name Here
local PlayerGui = Player:WaitForChild("PlayerGui") -- Waits For The Instance "PlayerGui" Inside of Player
local Gui = PlayerGui.GuiNameHere -- Finds Your Gui Inside Of The Players Gui
local FrameToMakeVisible = Gui.FrameNameHere -- Any Child Of The Gui That Has The Property "Visible"

Tool.Equipped:Connect(function() -- Fires When Tool Is Equipped
    FrameToMakeVisible.Visible = true -- Will Set The Gui To Visible
end)

Tool.Unequipped:Connect(function() -- Fires When Tool Is Un Equipped
    FrameToMakeVisible.Visible = false -- Will Set The Gui To Invisible
end)
Ad

Answer this question