I am trying to make a gui of the tool, but first i just want to make a simple gui appear before moving on to anything else. I got a simple gui script, put it in playerGui and it worked perfectly, now that I have moved it to appear on equip, it doesn't work. Any thoughts?
local tool = script.Parent local player = game.Players.LocalPlayer tool.Equipped:connect(function(mouse) local screenGui = Instance.new("ScreenGui") screenGui.Parent = script.Parent.Parent local textLabel = Instance.new("TextLabel") textLabel.Parent = screenGui textLabel.Position = UDim2.new(0, 25, 0, 50) textLabel.Size = UDim2.new(0, 150, 0, 50) textLabel.BackgroundColor3 = BrickColor.White().Color textLabel.Text = "Hello ROBLOX!" end)
This is because you are actually parenting the GUI to the Character. In order to make the GUI appear on the player's screen, you'll need to put it in the player's PlayerGui. This is a simple fix, just change line 8 to:
screenGui.Parent = player.PlayerGui
Nick told you your answer, but he didn't post it as an answer, so I decided to do it.