I'm trying to make a tool that prints "fart" when its equipped and you click.
Player = game.Players.LocalPlayer Character = Player.Character Humanoid = Character.Humanoid Mouse = Player:GetMouse() local tool = script.Parent function onEquipped() Mouse.Button1Down:connect(function() print("fart") end) end) tool.Equipped:connect(onEquipped)
why isn't it working?
Use the tool.Activated event.
local Player = game.Players.LocalPlayer local Character = Player.Character local Humanoid = Character.Humanoid local Mouse = Player:GetMouse() local tool = script.Parent tool.Activated:Connect(function() print("Fart") end)