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

Tool OnEquip not showing a gui, why?

Asked by 9 years ago

So when I equip a tool, it's MEANT to show a gui, but it doesn't work. Why?

local GUI = script.ScreenGui

script.Parent.Equipped:connect(function()
GUI = script.GUI:Clone() -- copy the GUI
GUI.Parent = game.Players.LocalPlayer.PlayerGui -- place the GUI to player's playergui
end)

1 answer

Log in to vote
1
Answered by
Kyokamii 133
9 years ago

GUI isnt in the script.

local GUI = script.ScreenGui

script.Parent.Equipped:connect(function()
nGUI = GUI:Clone() -- copy the GUI
nGUI.Parent = game.Players.LocalPlayer.PlayerGui -- place the GUI to player's playergui
wait()
end)


This should work. You were checking for an object that isnt in the script :p

0
:/ TheHospitalDev 1134 — 9y
Ad

Answer this question