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

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

Asked by 6 years ago

I really need this for an airline, any help?

0
I answered you last time why don't you read it? magicguy78942 238 — 6y
0
It didn't work. smh Clashing_McFTW -22 — 6y
0
Talking like that will just only get your account suspended from this website. Watch out for your speech. magicguy78942 238 — 6y
0
Well, can you help me please? Clashing_McFTW -22 — 6y
View all comments (4 more)
0
We cant help you if you didnt even post a script, you didnt give us enough info too. Sergiomontani10 236 — 6y
0
Look in answers, k ty. Clashing_McFTW -22 — 6y
0
Scripting Helpers is NOT a request site. Fragmentation123 226 — 6y
0
I didn't request anything. I simply asked for help on something that I worked on for around 2 hours. Clashing_McFTW -22 — 6y

Closed as Not Constructive by magicguy78942, Fragmentation123, User#20388, and User#21908

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

3 answers

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

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.

0
First off, I said it doesn't work. smh | I didn't have output open. | Nothing in there about the tool in output. Clashing_McFTW -22 — 6y
0
And I did both steps. Clashing_McFTW -22 — 6y
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. magicguy78942 238 — 6y
0
Not my fault that I didn't have it on, lmao. Clashing_McFTW -22 — 6y
View all comments (3 more)
0
I'm quite triggered. Bilinearly 58 — 6y
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 Clashing_McFTW -22 — 6y
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 Clashing_McFTW -22 — 6y
Ad
Log in to vote
0
Answered by 6 years ago

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)
Log in to vote
-1
Answered by 6 years ago

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.

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. Bilinearly 58 — 6y
0
Mate, I joined this site today, what do you expect? Clashing_McFTW -22 — 6y