Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

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

1 comment

0

i Have the Variables On different rows its Just a Funny Looking Code

1 answer

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)

This discussion is preserved as it was. New answers, comments, and votes are closed.