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

Why can't I interact with buttons outside a frame? (screenshot included)

invis = -- i can't find the button i want to make invisible
script.Parent.MouseButton1Click:connect(function()
	invis.Visible = false
end)

https://imgur.com/a/2Le7x8d

1 answer

Hello!

The instance looks like it's a child of Frame isn't it?

invis = script.Parent.Parent["Enter here the name of the button"] -- replace the text that's in "" with the button name
script.Parent.MouseButton1Click:connect(function()
    invis.Visible = false
end)

If it is a child of StarterGui then:

invis = script.Parent.Parent.Parent["Enter here the name of the button"] -- replace the text that's in "" with the button name
script.Parent.MouseButton1Click:connect(function()
    invis.Visible = false
end)

See what I did? I 'jumped' from parent to parent to the Parent where the button is.

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