i have already added a click decter i just need to know how to script it
✓ ANSWER ACCEPTED
how do i make a part react (like printing something) when clicked?
2 answers
✓ Accepted answer
put a script inside of the click detector
and paste this inside of the script:
local Click = script.Parent -- this is for getting the click detector
Click.MouseClick:Connect(function() -- MouseClick is the event used for click
print("my parent has been clicked ;-;")
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
This discussion is preserved as it was. New answers, comments, and votes are closed.
