#using click detector event to check if the player is holding down left mouse btn

1 messages · Page 1 of 1 (latest)

mellow tusk
#
local Blocks = script.Parent.Parent.Blocks
local Block = Blocks.Block

Block.ClickDetector.MouseClick:Connect(function(c)
    print("clicked")
end)

this prints click whenever i click on the part but i want it to check if the player is holding down left mouse button and how long has they been holding down the button. I want to recreate the block breaking feature like in minecraft

elder fog
#

And stuff like that

mellow tusk
#

can u point me into a doc or tutorial? im quite new to roblox development

elder fog
#

Advanced Roblox Scripting Tutorial #5 - Mouse (Beginner to Pro 2019)

Hey guys! welcome to a brand new video and in todays roblox scripting tutorial I'm going to be teaching you about the Mouse and how to use it! Anyways the mouse is very important so be sure to let me know if you have any questions in the comments as always. Enjoy!

--Join my D...

▶ Play video
#

It's quite old

#

But it will help you to create block outline and stuff like that

mellow tusk
#

thanks

elder fog