Mousebutton1click not firing

hey guys, so i was working on a game and i scripted a button to open another gui, the mousebutton1click didnt even fire. heres my script:

--anirudh851
script.Parent.MouseButton1Click:Connect(function()
	script.Parent.Parent.shop.Visible = true
end)

i tried doing a print too but it didnt print. u can clearly see that my code doesnt have any errors at all, all the namings are double checked. the mousebutton1clicks that i scripted yesterday are working, but since morning they arent working. help would be appreciated, thanks.

Show us a screenshot of where the script is placed in explorer. The script should be working, it’s just a matter of where it’s placed and where ‘shop’ is located.

Can you send ss of the script location in explorer? I see no problem with the script.

make sure its a local script and its placed under the button that you wanna click

2021-05-17 (6)
but the issue is still not with the script position or anything, as i mentioned i tried doing a simple print when the button is clicked but it didnt work.

script.Parent.MouseButton1Click:Connect(function()
	script.Parent.Parent.Parent.Shop.Visible = true
end)

it happened becuz you was just making the button that you clicked to be visible which is kinda weird and i knew that you were gonna open the shop frame so i gave you this

2 Likes

oop thanks. turns out the naming was wrong sry to take ur time :sweat_smile: