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

How do I define mousebutton1down in this script????

The script:

local Players = game:GetService("Players")
local tool = game.Workspace.tool
tool.Equipped(function()
	mousebutton1down(function()
		local Money = Players.leaderstats.TIX
		local Money = Players.leaderstats.TIX
        Money.Value += 1
	end)
end)

2 comments

1

use tool.Activated to detect clicks with tools

0

did this guy literally post 2 questions for the same thing

1 answer

I don't think you would need you would need to use an Equipped event, but you should probably use Activated event instead of MouseButton1Down, Activated means when you click with the tool equipped. So basiclly.

local Players = game:GetService("Players")
local Tool = game.Workspace.Tool

Tool.Activated:Connect(function()
	--Code Goes here
end)

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