Hi I have the following code for server and client scripts:
Server:
local remoteEvent = game.ReplicatedStorage:WaitForChild("ToggleProximity")
while wait() do
for _, plr in ipairs(game:GetService("Players"):GetPlayers()) do
local isPartOfTeam = (plr.Team == teams["King"]) -- returns either 'true' or 'false'
remoteEvent:FireClient(plr, isPartOfTeam)
if plr.Team == teams.King then
for _, tool in pairs(plr.Backpack:GetChildren()) do
if tool.NumberValue.Value == 0 then
kingPieces.Value = "0/3"
elseif tool.NumberValue.Value == 1 then
kingPieces.Value = "1/3"
elseif tool.NumberValue.Value == 2 then
kingPieces.Value = "2/3"
elseif tool.NumberValue.Value == 3 then
kingPieces.Value = "3/3"
end
end
end
end
end
Client:
local remoteEvent = game.ReplicatedStorage:WaitForChild("ToggleProximity")
remoteEvent.OnClientEvent:Connect(function(isVisible)
-- get the proximity prompt and make it visible depending on the 'isVisible' parameter
if workspace:FindFirstChild("Map") and workspace.Map:FindFirstChild("Palace") then
for i, descendant in pairs(workspace.Map.Palace:GetDescendants()) do
if descendant:IsA("Tool") and descendant:FindFirstChild("Handle") and not game.Players:GetPlayerFromCharacter(descendant.Parent) then
descendant.Handle.ProximityPrompt.Enabled = isVisible
end
end
end
end)
And I get the following list of errors:
23:05:02.755 Remote event invocation queue exhausted for ReplicatedStorage.ToggleProximity; did you forget to implement OnClientEvent? (1 events dropped) - Studio
23:05:02.755 Remote event invocation queue exhausted for ReplicatedStorage.ToggleProximity; did you forget to implement OnClientEvent? (2 events dropped) - Studio
23:05:02.755 Remote event invocation queue exhausted for ReplicatedStorage.ToggleProximity; did you forget to implement OnClientEvent? (4 events dropped) - Studio
23:05:02.755 Remote event invocation queue exhausted for ReplicatedStorage.ToggleProximity; did you forget to implement OnClientEvent? (8 events dropped) - Studio
23:05:02.755 Remote event invocation queue exhausted for ReplicatedStorage.ToggleProximity; did you forget to implement OnClientEvent? (16 events dropped) - Studio
23:05:02.755 Remote event invocation queue exhausted for ReplicatedStorage.ToggleProximity; did you forget to implement OnClientEvent? (32 events dropped) - Studio
23:05:02.755 Remote event invocation queue exhausted for ReplicatedStorage.ToggleProximity; did you forget to implement OnClientEvent? (64 events dropped) - Studio
23:05:02.783 Remote event invocation queue exhausted for ReplicatedStorage.ToggleProximity; did you forget to implement OnClientEvent? (128 events dropped) - Studio
23:05:04.333 Remote event invocation queue exhausted for ReplicatedStorage.ToggleProximity; did you forget to implement OnClientEvent? (256 events dropped)
And yes I have the remote event named correctly in replicated storage, Any ideas what could be causing it?