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

How do I open a gui with a button, cause in the properties it says enabled but i cant see it?

Asked by 4 years ago

local HelpGUI = game.StarterGui.HelpGUI
local help = script.Parent

help.MouseButton1Click:Connect(function()
    HelpGUI.Enabled = true
end)

1 answer

Log in to vote
1
Answered by
Lakodex 711 Moderation Voter
4 years ago

Issue

You are using game.StarterGui.HelpGUI even though StarterGui is a holder for GUI objects and then when someone joins.

Fix

You change local HelpGUI = game.StarterGui.HelpGUI to local HelpGUI = game.Players.LocalPlayer.PlayerGui.HelpGUI, make sure this is all in a localscript and not a serverscript!

local HelpGUI = game.Players.LocalPlayer.PlayerGui.HelpGUI
local help = script.Parent

help.MouseButton1Click:Connect(function()
    HelpGUI.Enabled = true
end)
0
Thanks, this helped! ack_superbear 35 — 4y
Ad

Answer this question