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

MouseButton1Down is not a valid member of Frame?

I have a LocalScript placed under a frame and I get this error. Here is the code.

Any help? This is the part of the script that errors out.

script.Parent.MouseButton1Down:connect(function()

1 comment

2

The frame does not connect to MouseButton1Down, that function is for a text button or Image Button.

1 answer

List of Frame Events

Frame only has mouse-related events for when a mouse enters, leaves, moves around, and scrolls the mouse wheel. You need a Text Button or Image Button if you want to register mouse clicks, or make use of the UserInputService.

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