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

SurfaceGui TextButton script not opening another GUI, why?

On one of the walls of a house I have built in my game there is a TextButton that says "House Information". When you click it, it is supposed to bring up a ScreenGui that gives information about the house. For whatever reason, it is not doing this. Does anyone know why?

script.Parent.MouseButton1Click:connect(function()
	game:GetService("Players").LocalPlayer.PlayerGui.CommonHouseInfo.Frame.Visible = true
end)

1 answer

I think this should work. The screenGUI I put in, change to the name of yours. Insert a local script into the StarterGUI it should say:

game.StarterGUI.TextButton.MouseButton1Click:connect(function()
game.StarterGUI.ScreenGUI.CommonHouseInfo.Frame.Visible = true

tell me if it's wrong, I'm doing something similar soon.
Bye

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