Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why isn't my screengui showing up onscreen?

Asked by 5 years ago
Edited 5 years ago

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

0
Why not gui.Enabled = false and gui.Enabled = true LetterSlayer 42 — 5y
0
But if I do that parenting to the playergui still isn't working SpookyBo1 -1 — 5y
0
What is 'tool' referencing to? Are you getting an error? LetterSlayer 42 — 5y
0
I'm not getting an error, I'm adding a screenshot of the tool and I'll add the tool definition to that script SpookyBo1 -1 — 5y
View all comments (3 more)
0
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. LetterSlayer 42 — 5y
0
Never mind ManualActivationOnly, that doesn't need to be ticked. Untick "RequiresHandle". LetterSlayer 42 — 5y
0
I'm still not seeing the GUI onscreen after toggling requireshandle and using the wait for character SpookyBo1 -1 — 5y

Answer this question