Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Issues with change frame script?

Asked by 8 years ago

function Click() script.Parent.Parent.Frame.Visible= false script.Parent.Parent.ScrollingFrame.Visible = true end

script.Parent.MouseButton1Down:connect(Click)

I want it so when the text button is clicked it will switch to another frame but this won't work at all.

1 answer

Log in to vote
-2
Answered by 8 years ago

Try this code (fixed):

script.Parent.MouseButton1Click:connect(function()
    script.Parent.Parent.Parent.Frame.Visible = false
    script.Parent.Parent.Parent.ScrollingFrame.Visible = true
end)
0
14:46:45.000 - Frame is not a valid member of Frame Optitheory 0 — 8y
0
What line? GlitchMasta47 7 — 8y
0
14:54:55.092 - Main is not a valid member of Frame 14:54:55.093 - Script 'Players.Player1.PlayerGui.ScreenGui.Main.TextButton.Script', Line 2 Optitheory 0 — 8y
0
add another ".Parent" before ".Frame" and ".ScrollingFrame" GlitchMasta47 7 — 8y
Ad

Answer this question