Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Issues with change frame script?

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

Try this code (fixed):

script.Parent.MouseButton1Click:connect(function()
	script.Parent.Parent.Parent.Frame.Visible = false
	script.Parent.Parent.Parent.ScrollingFrame.Visible = true
end)

4 comments

0

14:46:45.000 - Frame is not a valid member of Frame

0

What line?

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

0

add another ".Parent" before ".Frame" and ".ScrollingFrame"

This discussion is preserved as it was. New answers, comments, and votes are closed.