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

How can i make a frame Be Visible When i Click A block?

Asked by 3 years ago

local clickdetector = script.Parent local gui = game.StarterGui.ScreenGui.Frame

clickdetector.MouseClick:Connect(function() gui.Visible = true end)

0
i Have the Variables On different rows its Just a Funny Looking Code kakkawertu567 0 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

I suggest just checking for the mouseclick locally. You'll have to make the part more identifiable by changing its name to something more unique

-- Local Script parented to ScreenGui
local clickdetector = workspace.Part.ClickDetector -- Path to click detector 
clickdetector.MouseClick:Connect(function(plr)
    if plr == game.Players.LocalPlayer then
        script.Parent.Frame.Visible = true
    end
end)
Ad

Answer this question