After pressing part, Frame appears. Here's the script:
Script in part:
local replicatedStorage = game:GetService("ReplicatedStorage")
local OpenGuiEvent = replicatedStorage:WaitForChild("OpenGuiEvent")
local part = script.Parent
local clickDetector = script.Parent.ClickDetector
clickDetector.MouseClick:connect(function(Player)
OpenGuiEvent:FireClient(Player)
end)
Script in ScreenGui:
local replicatedStorage = game:GetService("ReplicatedStorage")
local OpenGuiEvent = replicatedStorage:WaitForChild("OpenGuiEvent")
local gui = script.Parent
local frame = script.Parent:WaitForChild("Frame")
OpenGuiEvent.OnClientEvent:connect(function()
frame.Visible = true
end)
I also made the button for frame. How do I make the Frame disappear when the button is pressed?
