i have already added a click decter i just need to know how to script it
put a script inside of the click detector
and paste this inside of the script:
1 | local Click = script.Parent -- this is for getting the click detector |
2 |
3 | Click.MouseClick:Connect( function () -- MouseClick is the event used for click |
4 | print ( "my parent has been clicked ;-;" ) |
5 | end ) |
did you even try to figure this out yourself before posting here? just typing"roblox clickdetetcors" brings up at least 500 results about how to use one. whatever heres your answer:
https://developer.roblox.com/en-us/api-reference/class/ClickDetector
its called .mouseClick