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?

1local GUI = script.ScreenGui
2 
3script.Parent.Equipped:connect(function()
4GUI = script.GUI:Clone() -- copy the GUI
5GUI.Parent = game.Players.LocalPlayer.PlayerGui -- place the GUI to player's playergui
6end)

1 answer

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

GUI isnt in the script.

1local GUI = script.ScreenGui
2 
3script.Parent.Equipped:connect(function()
4nGUI = GUI:Clone() -- copy the GUI
5nGUI.Parent = game.Players.LocalPlayer.PlayerGui -- place the GUI to player's playergui
6wait()
7end)

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

0
:/ TheHospitalDev 1134 — 9y
Ad

Answer this question