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

If a player is holding a tool and clicks what would that function be?

Asked by
danglt 185
5 years ago

If a player is holding a tool and clicks what would that function be?

2 answers

Log in to vote
1
Answered by 5 years ago
Edited 5 years ago

Tool.Activated is an event that fires when the player clicks with their Left mouse button while a tool is equipped.

https://developer.roblox.com/api-reference/event/Tool/Activated

If this helped, make sure to upvote/accept it!

0
Too.Activated doesn't work anymore Ziffixture 6913 — 5y
0
Yes it does? I used it yesterday. joritochip 705 — 5y
0
Hm, that's odd Ziffixture 6913 — 5y
Ad
Log in to vote
0
Answered by
Ziffixture 6913 Moderation Voter Community Moderator
5 years ago

Tool.Activated would be the proper method to use, yet I believe it's been deprecated, to just do something like this is that essentially is the case

Tool.Equipped:Connect(function()
   Cursor.Button1Down:Connect(function()
      print("Clicked")
   end)
end)

Answer this question