Share with your friends

Place a part and make it look like a button and insert a click detector into the part. Then insert a script into the part (not click detector). In the script, delete everything and declare variables in line 1: local ClickDetector = script.Parent.ClickDetector and line 2: local Part = script.Parent. Line 3 is a connection statement to call the function when an event; in this case, the part is clicked to run certain functions: ClickDetector.MouseButton1Click:Connect(function(). Line 4 changes the brick color to a random brick color: Part.BrickColor = BrickColor.Random(). Line 5 ends the function: end)

Talk Doctor Online in Bissoy App