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

GUI visibility won't enable from a text button surface gui?

I have a text button and want to my a GUI visible, but it isn't doing anything.

script.Parent.Activated:Connect(function()
	game.Players.LocalPlayer.PlayerGui.ScreenGui.Laptop.Visible = true
end)

1 comment

0

Maybe you could change the BackgroundTransparency instead.

2 answers

script.Parent.Activated:Connect(function()
    game.Players.LocalPlayer.PlayerGui.ScreenGui.Laptop.Visible = not  game.Players.LocalPlayer.PlayerGui.ScreenGui.Laptop.Visible
end)

2 comments

0

It is set to invisible so when I click it shouldn't it make it visible? I don't want it 2 ways

0

? This script basically makes it the opposite of what yo do for e.g. If its visible then when you click it again its not visible

Just use BackgroundTransparency. Set the BackgroundTransparency of your Frame to 1 and use this script.

script.Parent.Activated:Connect(function()
	game.Players.LocalPlayer.PlayerGui.ScreenGui.Laptop.BackgroundTransparency = 1
end)

1 comment

0

Sorry, for line 2 I meant 0.

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