I have absolutely no clue how to do this but I really need to know how to do it
use the .Equipped and Unequipped events of a tool. Then, make the gui visible
EXMAPLE
Tool = game.StarterGear.Tool Gui= game.Players.LocalPlayer.PlayerGui.ScreenGui.Frame Tool.Equipped:connect(function() Gui.Visible = true end) -- Allows GUI to go away Tool.Unequipped:connect(function() Gui.Visible = false end)
For more information, Use the rblox wiki and go to this link http://wiki.roblox.com/index.php?title=API:Class/Tool
And look at the events section
So I have just an example, I actually use this for my Mobile Controls Basketball.
local plr = game.Players.LocalPlayer --This is a Local Script local playerGui = plr:WaitForChild("PlayerGui") --Better like this. local controlGuiClass = script.Parent.ControlsGUI local tool=script.Parent --What I did was put the GUI inside the Tool. tool.Equipped:connect(function() local CGClone = controlGuiClass:Clone() CGClone.Parent = playerGui --Transfer the Cloned GUI into the Player's GUI. CGClone.TextButton.Visible = true --I have my Visibility turned off, so I manually turn it on in this script. end) tool.Unequipped:Connect(function() if playerGui:FindFirstChild("ControlsGUI") then -- B/c it'll check the original variable, which you'll have to have the script playerGui.ControlsGUI:Destroy() end end) --Whenever you Unequip that tool, the GUI would be destroyed, meaning if you didn't have the Unequipped function, you would have a GUI still on your screen lol.
Also you could put it inside the Replicated Storage, but this method up here is more efficient, at least that's what I think.
Hopefully this helps, LukeGabrieI