local Player = game.Players.LocalPlayer
local gun = game.Player.Backpack:WaitForChild("PSTL")
gun.Equipped:connect(function(mouse)
Player.PlayerGui.ScreenGui.Frame.TextLabel.Text = "PSTL"
end)
I'm having troubles with changing the text of a TextLabel when a tool is equipped,

1 comment
It would be much more stable if you had this script in the gun and redefined "gun" as local gun = script.Parent, But that is for you to decide the way you find easiest.