Help please with menu script

hi, ive been following a youtube video on how to make a menu screen and i copied the code that the youtuber put in but the code isnt working. What it is meant to do is when the play button is clicked the gui will go invisble. What it is doing is simply nothing.Screenshot (269)|690x388

It is the name of the main frame, the M is capital while the one in the script isnt.

Both the youtubers i watched used capital letter M in the main frame yet used lowercase in the script, both didnt work for me

they do the same thing with ‘PlayFrame’

In the first line of code just put script.Parent.

i am not very savy when it comes to this topic, where exactly do i add that

Instead of script.Parent.Playtbutton put script.Parent

hmm still doesnt seem to work, i tried capitals for the variables but still doesnt work either way

ah nevermind your soulution did work i just didnt remove the playbutton from script.parent correctly.

wrong categorry move it before it gets flagged

i dont know how to move anything

click the pencil button near the title

Have you tried

local PlayButton = script.Parent.PlayButton
local MainFrame = script.Parent

MainFrame.Visible = false