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

Gui in a tool script?

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?

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)

1 comment

0

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

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