Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why isn't my tool working? (Need this extra part for title)

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?

1 comment

0

Make sure your tool has a part named "Handle", or turn off the "RequiresHandle" property. I've had this before.

1 answer

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)

This discussion is preserved as it was. New answers, comments, and votes are closed.