I have tried to change the gui's parent to the playergui, but to no avail. I don't know what's going wrong here.
-- Local script
local tool = script.Parent.Parent
local player = game:GetService("Players").LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
local gui = tool:WaitForChild("GunGUI")
local frame = gui:WaitForChild("Frame")
local ammoLabel = frame:WaitForChild("Ammo")
tool.Equipped:Connect(function()
gui.Parent = playerGui
end)
tool.Unequipped:Connect(function()
gui.Parent = script
end)
If the properties could be messing it up here's those:
Screengui: https://gyazo.com/c565bf27934ae5a5e16054f318f7959d
Frame, Inside screengui: https://gyazo.com/5bb958e8fb6fb705d76302ab9e112dbc
Textlabel, inside frame: https://gyazo.com/cd4d3f1854b01bfc2bd8110891b9270a
Tool layout: https://gyazo.com/6f110a503b3439b8a9849928c0f513cf

7 comments
Why not gui.Enabled = false and gui.Enabled = true
But if I do that parenting to the playergui still isn't working
What is 'tool' referencing to? Are you getting an error?
I'm not getting an error, I'm adding a screenshot of the tool and I'll add the tool definition to that script
Is "ManualActivationOnly" checked under the tool? Script seems to work after ticking that box. Also, just for safety, throw repeat wait() until game.Players.LocalPlayer.Character at the top of your script.
Never mind ManualActivationOnly, that doesn't need to be ticked. Untick "RequiresHandle".
I'm still not seeing the GUI onscreen after toggling requireshandle and using the wait for character