Roblox player input /AKA Mouse click

PHOTO EMBED

Tue Nov 09 2021 10:19:03 GMT+0000 (Coordinated Universal Time)

Saved by @HAHAimcoding #lua

local clickPart = script.Parent
-- Create a ClickDetector and set its parent
local clickDetector = Instance.new("ClickDetector")
clickDetector.Parent = clickPart
 
local function onPartClick(player)
	-- Output a message and randomly color the clicked part
	print(player.Name .. " clicked me!")
	clickPart.BrickColor = BrickColor.random()
end
 
clickDetector.MouseClick:Connect(onPartClick)
content_copyCOPY

https://developer.roblox.com/en-us/articles/introduction-to-input