Local Script
local RS = game:GetService("ReplicatedStorage")
local Folder = RS:WaitForChild("Remotes")
local RE = Folder:WaitForChild("RE")
local function invisible(playergui)
--if playergui then
print("Remote Fired")
playergui.Positions.Frame2.Visible = false
playergui.Positions2.Frame.Visible = false
--end
end
RE.OnClientEvent:Connect(invisible)
Server
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
local BoolValue = Instance.new("BoolValue", char)
BoolValue.Name = "IsPlayer"
local RS = game:GetService("ReplicatedStorage")
local Folder = RS:WaitForChild("Remotes")
local RE = Folder:WaitForChild("RE")
local playergui = player:WaitForChild("PlayerGui")
RE:FireClient(player, playergui)
end)
end)
I want the remote event to fire once a player joins the game the two guis goes invisible. There no errors and the remote event fires.