function onClick(mouse) script.Parent.Parent.Frame.Visible = true end script.Parent.MouseButton1Click:connect(onClick)
You're supposed to put it in a lua code block.
function onClick(mouse) script.Parent.Parent.Frame.Visible = true end script.Parent.MouseButton1Click:connect(onClick)
Your script basically has no problem, but make sure it's a button
This script will work in the following structure
-- Model ----Frame ----TextButton ------Script