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

how do i make a part react (like printing something) when clicked?

Asked by 3 years ago

i have already added a click decter i just need to know how to script it

2 answers

Log in to vote
0
Answered by
To0_ny 141
3 years ago

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)
Ad
Log in to vote
1
Answered by 3 years ago

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

Answer this question