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

How do you make a GUI appear when a tool is held?

I am trying to make a tool which when selected it shows a GUI which will be able to control a system I am developing.

1 answer

✓ Accepted answer

Ok so: Put your GUI into StartGui and turn the frame's visibility to false. (Use a local script for this)

local gui = game.Players.LocalPlayer.PlayerGui:WaitForChild("YOUR SCREEN GUI NAME HERE",5).YOUR FRAME NAME HERE

script.Parent.Equipped:Connect(function()
	
	gui.Visible = true
end)

script.Parent.Unequipped:Connect(function()
	gui.Visible = false
end)

Script.Parent being inside the tool like here:https://gyazo.com/ebf795437d388fc492584cbadb632f57

1 comment

0

Cheers!

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