I am new to scripting and I am teaching myself which is going smoothly except the output is saying I need a nil value to fix my script
local play = script.Parent
local Frame = game.StarterGui.Check.Frame
local Click = play.MouseButton1Click:connect(onClick)
local Check = game.StarterGui.Check
Check.Frame.Visible = true
function onClick(play)
Check.Frame.Visible = nil
end
the output says attempt to call a nil value
I even tried making the script:
local play = script.Parent
local Frame = game.StarterGui.Check.Frame
local Click = play.MouseButton1Click:connect(onClick)
local Check = game.StarterGui.Check
Check.Frame.Visible = true
function onClick(play)
Check.Frame.Visible = nil
if nil == true then
Check.Frame.Visible = false
end
end
Please help!

1 comment
"attempt to call a nil value" doesn't mean to use a nil value, it's saying you're trying to index (use) a non-existent value.