You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I want to make a tool that when equipped shows a gui. -
What is the issue? Include screenshots / videos if possible!
I have tried many workarounds but none have worked so far. -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I tried looking at a video and looking at posts about people who had the same issue, but none of their solutions worked and I did look on the dev hub.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
The code is in a server script inside of a tool.
local playname = script.Parent.Parent.Parent.Name
local tool = script.Parent
local player = game:GetService("Players"):WaitForChild(playname)
local gui = player.PlayerGui
local newgui = script.Janitorgui:Clone()
newgui.Parent = gui
tool.Equipped:Connect(function()
newgui.Enabled = true
end)
tool.Unequipped:Connect(function()
newgui.Enabled = false
end)
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.