So I'm trying to make a open/close gui with FE on but it errors out. Can anyone help me fix it?
Script(In ServerScriptStoarge) :
local Storage = game:GetService('ReplicatedStorage')
local OpenEvent = Storage:WaitForChild('OpenShop')
local Players = game:GetService('Players')
local Player = Players.LocalPlayer
local Shop = Player:WaitForChild('ShopGui')
local Frame = Shop:WaitForChild('ShopFrame')
local Button = Shop:WaitForChild('OpenShop')
--Core
local function onFired()
local open=false
if open==false then
open=true
print('True')
elseif open==false then
open=false
print('False')
end
end
OpenEvent.OnServerEvent:Connect(onFired)
Local Script(Inside of a button) :
local Players = game:GetService('Players')
local Player = Players.LocalPlayer
local Storage=game:GetService('ReplicatedStorage')
local Open=Storage:WaitForChild('OpenShop')
local function OnClick()
Open:FireServer()
end
script.Parent.MouseButton1Click:Connect(OnClick)

1 comment
You dont need the local in line 10 of the server script and you dont need local in line 6 in the local script