Advertisement
Guest User

CollectionService Script

a guest
Oct 27th, 2018
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.27 KB | None | 0 0
  1. local CollectionService = game:GetService("CollectionService")
  2. local ClickDetectors = CollectionService:GetTagged("Clicker") --This returns a table of the click detectors
  3.  
  4. for _,v in pairs(ClickDetectors) do
  5.     v.MouseClick:connect(function()
  6.         print"Clicked"
  7.     end)
  8. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement