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

Trying creating Clicker Attack Action?

Asked by 5 years ago

I am facing terrible problem. Firstly, it will not allow me to rest in peace. Well, Robloxians, I am attempting to make my mouse click using the scripts.

I am not experienced, but have a lot of potential if you will support me. Thank you for whoever does.

player = game:GetService("Players"):FindFirstChild("LocalPlayer"):GetMouse()

-- for the mouse script

Any ideas how I can make this into a click script. Thanks!

0
tsk tsk tsk theking48989987 2147 — 5y
0
`LocalPlayer` isn't a child of the Players Server, but rather a property theking48989987 2147 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

Make sure to put this into a local script in StarterGui or StarterCharacterScripts:

player = game.Players.LocalPlayer:GetMouse() --Gets the localplayer's mouse.

player.Button1Down:Connect(function() --Whenever the left mouse button gets pressed.
    --code here.
end)

Hope this helped!

0
...lol why define the mouse as the "player"? SerpentineKing 3885 — 5y
0
blame "SignedRobloxian". i try and keep the scripts as close to the original form as possible. sonysunny 36 — 5y
0
Perfectly done. SignedBloxian 2 — 5y
Ad

Answer this question