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
4 years ago

The script:

1local Players = game:GetService("Players")
2local tool = game.Workspace.tool
3tool.Equipped(function()
4    mousebutton1down(function()
5        local Money = Players.leaderstats.TIX
6        local Money = Players.leaderstats.TIX
7        Money.Value += 1
8    end)
9end)
1
use tool.Activated to detect clicks with tools Leamir 3138 — 4y
0
did this guy literally post 2 questions for the same thing TheUltimateTNTFriend 109 — 4y

1 answer

Log in to vote
0
Answered by 4 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.

1local Players = game:GetService("Players")
2local Tool = game.Workspace.Tool
3 
4Tool.Activated:Connect(function()
5    --Code Goes here
6end)
Ad

Answer this question