So when I equip a tool, it's MEANT to show a gui, but it doesn't work. Why?
1 | local GUI = script.ScreenGui |
2 |
3 | script.Parent.Equipped:connect( function () |
4 | GUI = script.GUI:Clone() -- copy the GUI |
5 | GUI.Parent = game.Players.LocalPlayer.PlayerGui -- place the GUI to player's playergui |
6 | end ) |
GUI isnt in the script.
1 | local GUI = script.ScreenGui |
2 |
3 | script.Parent.Equipped:connect( function () |
4 | nGUI = GUI:Clone() -- copy the GUI |
5 | nGUI.Parent = game.Players.LocalPlayer.PlayerGui -- place the GUI to player's playergui |
6 | wait() |
7 | end ) |
This should work. You were checking for an object that isnt in the script :p