New: Nitro Boost our Discord server and receive full donation perks here on the website! Join the Scripting Helpers Discord Server to learn more! You can also Support on Patreon as always.
Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

i'm trying to make a GUI appear when you click a brick how do you do it?

Asked by 1 year ago
Edited by Shawnyg 1 year ago

Please encode Lua code in the Lua block code tag (look for the Lua icon in the editor).

here is my script (its local)

local player = game.Workspace.localPlayer
local repStorage = game:GetService("ReplicatedStorage")
local remote = repStorage:FindFirstChild("ButtonClick")
mouse = player:GetMouse()
local idoit = script.Parent
UI = game.StarterGui.KiKidied.tooxtbutton --idk why i named it that no judge

idoit.MouseButton1Click:Connect(function()
        player.PlayerGui.UI.Enabled = true
end)
0
... DaggerOf_Fly -22 — 1y
0
Edit: Put code in a code block Shawnyg 3915 — 1y

1 answer

Log in to vote
0
Answered by 1 year ago

I suggest putting the local script in playergui or starterplayerscript. If you want a gui to be visible, it be like the following example below. local GUI = blahblah local Button = GUI.Button

local frame = GUI.Frame

Button.MouseButton1Click:Connect(function() Frame.Visible = true end)

0
i put it in starter gui and it still doesent work here it islocal player = game.Workspace.localPlayerlocal repStorage = game:GetService("ReplicatedStorage") local remote = repStorage:FindFirstChild("ButtonClick") mouse = player:GetMouse() local idoit = game.Workspace.CHING.ClickDetector UI = game.StarterGui.KiKidied.tooxtbutton --idk why i named it that no judge local GUI = UI local Button = GUI.B natonator63 24 — 1y
Ad

Answer this question