Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

WHAT!!! MY MOUSE ISN'T CLICKING ON SUCH AN EASY MOUSE DOWN EVENT?!?!

WOAh, So, I am literally making a game. and it needs you to click on a part and then it appears. SO!!! I started off writing this long code and soon came to the conclusion that the event itself is broken, here is what I mean: What I did:

local m = game.Players.LocalPlayer:GetMouse()
m.Button1Down:Connect(function()
	print('hi')
end)

***Dude.. It doesn't print, there is no error and I am simply lost in the dark to solve this ugly Glitch >:(

HelPpPpPp, ThANccX

I tried multiple other things like, gui's might be effecting it, i deleted every gui and still nothing.... Yall halp me***

11 comments

0

local script?

0

yes

0

I normally do it from localscripts

0

Where is the script located?

0

startergui

0

You need to use remote events.

1

I tested this by inserting the code into a LocalScript in StarterGui. As I expected, it worked. I belive your error stems from some other element/script in your game, or the LocalScript being disabled.

0

Is the LocalScript running? Try adding a print at the top

0

Does filtering the target make it any less to work?

0

Check if your script is not disabled.

0

I never even disable my scripts

1 answer

Insert a ClickDetector into the part you want clicked and connect a function to the MouseClick event.

ClickDetector.MouseClick:Connect(function()
	print("Clicked")
end)

1 comment

0

Cannot happen

This discussion is preserved as it was. New answers, comments, and votes are closed.