I don't know why it isn't working
local Player = game:GetService("Players").LocalPlayer local Tool = game.StarterPack.HighPad Tool.Equipped:Connect(function() Player.PlayerGui.Tablet.OuterBody.Visible = true Player.PlayerGui.Tablet.OuterBody.Active = true end) Tool.Unequipped:Connect(function() Player.PlayerGui.Tablet.OuterBody.Visible = false Player.PlayerGui.Tablet.OuterBody.Active = false end)
Put your gui in the tool. Then put this script in the tool:
script.Parent.Equipped:Connect(function() player = game.Players:FindFirstChild(script.Parent.Parent.Name) gui = script.Parent:FindFirstChild("GuiName"):Clone().Parent = game.Players:FindFirstChild(script.Parent.Parent.Name) end) script.Parent.Unequipped:Connect(function() game.Players[player].PlayerGui.GuiName:Destroy() end)
This should fix your problem. If it doesn't, the output from this script in ROBLOX Studio should say something that is easy enough to understand and help you fix the issue.
You are connecting the function to the Equipped signal of the tool in StarterPack. When the player spawns, the tool will be cloned into the player's backpack but the script will continue to listen for when the tool which is in StarterPack is equipped. To fix this, you could put the script under the tool and replace this line
local Tool = game.StarterPack.HighPad
with this
local Tool = script.Parent