When Im using MouseButton1Click its not working

You don’t see the answer I left read because I said sorry for putting the local player I didn’t know

copy now if you put it in guiyou’re on fire haha

Who would think of putting so many waitforchild in a script?

Scripts that involves using instances that has a possibility of not being inserted into the game by the time the script runs. @JackscarIitt has used his script correctly because there is a possibility that a big GUI has not finished loading all the instances needed by the time the local script runs.

I’d recommend researching more into the Player Containers Guide before attempting to take on problems that even you yourself, may struggle on or don’t have yet full knowledge about

I don’t mean it in an insult in any sort of way, but if your posts aren’t well educated enough then members are gonna struggle, and possible have to create relevant separate posts about why another portion of their script isn’t working due to a poorly-drawn solution that someone thought was the answer

@ItzMeZeus_IGotHacked Make sure to keep it between DM’s & keep track on topic & if the issue becomes a huge situation just simply flag the post, don’t turn it into a crowd attracter :slightly_smiling_face:

1 Like

Hey, sorry for my delayed response, but the script doesn’t output anything

Did it give out any errors? Have you made sure you placed the local script under the Button instance?

hey, how about if you put frames and different guis, since that way it will generate many problems when programming them, if many things would break simply by changing that, you have to get used to it

No, could It be because of a UIGridLayout?

you don’t have to put it as a child of the frame

UIGridLayout instance does not and will never interfere your script unless you are using it inside the script.

If any of this helps:
Screenshot 2023-01-27 185813
Uploading: Screenshot 2023-01-27 185823.png…
Screenshot 2023-01-27 185758
Screenshot 2023-01-27 185823

The properties of the button don’t matter, can you tell me where did you place the local script code I had given to you just now?

Inside of the button

This text will be blurred

Hi, i’m low-leveled dev
I want to try solve this issue
Would you like to create a function then call it? Like

local UIbutton = script.parent

function name()
-- put things here like print, etc
end

UIbutton.MouseButton1Click:Connect(name)

i always use that and worked, idk with yours

1 Like

I would recommend creating a new place, or a copy of a place file & send it here for us to replicate the issue at hand & maybe we can have a better chance of resolving your issue

Also please make sure to check out My Post From Earlier on why your script isn’t working in the first place, PlayerGui basically clones children that’s inside the StarterGui & it may not replicate fast back in time which returns back as an error

I get a error this time:

Don’t you understand that this is not optimized?

If I may ask, what exactly is not optimized?

It’s MouseButton1Click, NOT MouseButtonClick1.

1 Like