Hello, I've been trying to type a script that lets as gui popup when you open a tool.. I just can't think of what to put.. Anyone know a script?
COMMUNITY QUESTION
Gui in a tool script?
1 answer
Inside the tool?
local Gui = Game:GetService("ReplicatedStorage").??? --The gui
local Player = Game:GetService("Players").LocalPlayer --Get the local player
local Tool = script.Parent
Tool.Equipped:connect(function() --Executes when the tool is equipped
if not Player.PlayerGui:FindFirstChild(Gui.Name) then --Makes sure he does not have the gui
Gui:Clone().Parent = Player.PlayerGui --Gives the gui
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
It's like a gui inside of a tool, And when you open the tool the gui opens.