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

How do I make a tool that when equiped a gui pops up?

I really need this for an airline, any help?

8 comments

0

I answered you last time why don't you read it?

0

It didn't work. smh

0

Talking like that will just only get your account suspended from this website. Watch out for your speech.

0

Well, can you help me please?

0

We cant help you if you didnt even post a script, you didnt give us enough info too.

0

Look in answers, k ty.

0

Scripting Helpers is NOT a request site.

0

I didn't request anything. I simply asked for help on something that I worked on for around 2 hours.

3 answers

Please read the steps carefully:

  1. Create a GUI

  2. Put the GUI into the tool

  3. Put this local script into the tool

local tool = script.Parent
local GUI = tool:FindFirstChild("GUINAME") or tool:WaitForChild("GUINAME")
--If you don't know how to locate the Gui then you shouldn't be here tbh.

local function Equipped()
    local char = tool.Parent
    local plr = game.Players:GetPlayerFromCharacter(char)
   	 if plr then
	    	local plrgui = plr:FindFirstChild"PlayerGui" or plr:WaitForChild"PlayerGui"
		GUI.Parent = plrgui
	end
end
local function Unequipped()
    GUI.Parent = tool
end
tool.Unquipped:connect(Unequipped)
tool.Equipped:connect(Equipped)

NOTE: IF THIS DOESN'T WORK. DO NOT CALL ME SMH. IT WILL ONLY GET YOU BANNED FROM THIS WEBSITE. LOOK IN THE OUTPUT AND COMMENT WHAT THE OUTPUT SAYS.

7 comments

0

First off, I said it doesn't work. smh | I didn't have output open. | Nothing in there about the tool in output.

0

And I did both steps.

0

Apparently this script has been working for everbody. If you don't know what the output is or how to locate the GUI. This can not be done. It's your fault not knowing the easiest thing.

0

Not my fault that I didn't have it on, lmao.

0

I'm quite triggered.

0

@magicguy72942 | 20:23:51.698 - Attempt to connect failed: Passed value is not a function 20:23:51.699 - Stack Begin 20:23:51.700 - Script 'Players.Clashing_McFTW.Backpack.Tool.LocalScript', Line 18 20:23:51.701 - Stack End 20:23:54.906 - Something unexpectedly tried to set the parent of to NULL while trying to set the parent of . Current parent is Backpack. 20:23:56.041 - Something unexpectedly

0

tried to set the parent of to NULL while trying to set the parent of . Current parent is Backpack. 20:23:56.041 - Something unexpectedly tried to set the parent of Adonis_Client to NULL while trying to set the parent of Adonis_Client. Current parent is Clashing_McFTW. (x4) 20:23:56.698 - Infinite yield possible on 'Workspace.Clashing_McFTW.Head:WaitForChild("Died")' 20:23:56.701 - Stack Begin 20:2

Create a GUI called 'TabletGUI' (in the tool). Then create a localscript.

local gui = script.Parent.TabletGui:Clone()

function Equip()
	gui.Parent = game.Players.LocalPlayer.PlayerGui
end

function Unequip()
	gui.Parent = nil
end

script.Parent.Equipped:connect(Equip)
script.Parent.Unequipped:connect(Unequip)

01 local tool = script.Parent 02 local GUI = tool:FindFirstChild("GUINAME") or tool:WaitForChild("GUINAME") 03 04 local function Equipped() 05 local plr = game.Players.LocalPlayer 06 local plrgui = plr.PlayerGui 07 GUI.Parent = plrgui 08 end 09 local function Unequipped() 10 GUI.Parent = tool 11 end 12 tool.Unquipped:connect(Unequipped) 13 tool.Equipped:connect(Equipped)

Doesn't work.

2 comments

1

This is so dumb. TBH, you copied the numbers from the left of the Lua code sent by magicguy. Get the HTML of the code and copy it there. Hover your mouse over the code and click the page with arrows. Copy the code once directed.

0

Mate, I joined this site today, what do you expect?

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