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 9 months ago
Edited by Shawnyg 9 months 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 — 9mo
0
Edit: Put code in a code block Shawnyg 3898 — 9mo

1 answer

Log in to vote
0
Answered by 9 months 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 15 — 9mo
Ad

Answer this question