Something happens when script is pressed

Hello, to all scripters I need help with a script.
I need a script that when a block is clicked something happens in a area
I have looked for tutorials on how to do this but cant find any if you could help me I would be most grateful.

You can use ClickDetector, create one inside the part and inside the function write what is going to happen

local Part = workspace.Part
Part.ClickDetector.MouseClick:Connect(function(Player) -- the player who clicked
	-- code
end)
1 Like

Here ya go redirects to roblox library

1 Like