Mouse click detect

Hello, I am trying to figure out how I can make the game detect when the mouse is being pressed, but not like clicking a button but the mouse being clicked in general.

2 Likes

I also want the script to repeat if the mouse is being held down too.

Read this articles Player | Documentation - Roblox Creator Hub

10 Likes

the following script repeats code when the player holds down either left or right button

--replace m with mouse instance
while wait() do
if m.Button1Down or m.Button2Down then
--code here
end
end

though i probably would not recommend using print() with this

wait no sry i treated m.Button1Down like a boolean it is an event