Scripting Helpers is winding down operations and is now read-only. More info→
Ad
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 6 years ago
Edited by Shawnyg 6 years 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 -24 — 6y
0
Edit: Put code in a code block Shawnyg 4330 — 6y

1 answer

Log in to vote
0
Answered by 6 years 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 29 — 6y
Ad

Answer this question