Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by
OFF_S4LE 127
3 years ago

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)
1
use tool.Activated to detect clicks with tools Leamir 3138 — 3y
0
did this guy literally post 2 questions for the same thing TheUltimateTNTFriend 109 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago

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)
Ad

Answer this question