I want to make a brick that changes its transparency each individual time it's clicked on, How do I make this script? Also, does the script start with function?
COMMUNITY QUESTION
How do I do the click script or click action?
1 answer
Well, to detect a click on a part, you'd need to use a ClickDetector. From that, you can tell when a MouseClick event is fired. Since you haven't attempted this on your own, I'm not going to provide you with a script. You should know the basics, by changing the transparency. I'll just give you the script they provided on the Wiki.
Example:
Workspace.Part.ClickDetector.MouseClick:connect(function(playerWhoClicked)
print("Part was clicked by: " .. playerWhoClicked.Name)
end)
1 comment
0
How do I add transparency responding to the click?
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
This is not a request site. Please do your own research and make an attempt.
back off