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

Gui won't display on tool Equipped?

Asked by 1 year ago

My screen gui won't display

script.Parent.Equipped:Connect(function()
    script.Parent.Parent.Parent.StarterGui["Device Screen"].Enabled = true
end)

script.Parent.Unequipped:Connect(function()
    script.Parent.Parent.Parent.PlayerGui["Device Screen"].Enabled = false
end)

I have tried startergui and playergui

0
you should try to define it as a value like "local screengui = script.Parent.Parent.Parent.StarterGui["Device Screen"]  Fouxelefr 7 — 1y

2 answers

Log in to vote
1
Answered by 1 year ago

You are going to be using PlayerGui but instead of Script.Parent Your going to need to use game.Players.LocalPlayer.PlayerGui Full example in local script in your tool

game.Players.LocalPlayer.PlayerGui["Device Screen"].Enabled =  true --For the Unequipped function copy this and change it to false

Hope this Helps!!

Ad
Log in to vote
0
Answered by
xXMadonXx 190
1 year ago

You have set the PlayerGui (which is the correct one) to false instead of true.

0
Hu that just disables the players gui completely 666_brithday 103 — 1y

Answer this question