RemoteEvent not firing to all clients

I was working on my game’s code this morning adjusting some things and all of the sudden, part of my script is just not working. I have a RemoteEvent being fired to all clients in my server script inside of a function, and I’m adding print statements to where it’s being fired on my client local script but the print statements are just not printing.

Don’t worry this should be working, it’s inside a function and everything else runs perfectly fine with it, except for this.

game.ReplicatedStorage:WaitForChild('Remotes').StartMapVoting:FireAllClients(mapVotes)

The problem is that it’s not printing at all in the client local script:

game.ReplicatedStorage:WaitForChild('Remotes').StartMapVoting.OnClientEvent:Connect(function(data)
	print("fireddd")
	for i,v in pairs(script.Parent:WaitForChild('Menu').Maps:GetChildren()) do
		for x,map in pairs(data) do
			if v:IsA('ImageButton') and map.order == v.LayoutOrder then
				print("hello")
				if game.ReplicatedStorage.Maps:FindFirstChild(v.Name) then
					print("Heeeeeeeeeelo")
					local mapInfo = game.ReplicatedStorage.Maps:FindFirstChild(map.name)
					v.MapName.Text = mapInfo.Name
					v.Votes.Text = #map.players
					
					if currentVote == map.order then
						v.BorderColor3 = Color3.fromRGB(0,255,0)
					else
						v.BorderColor3 = Color3.fromRGB(100, 100, 100)
					end
					
					v.MouseButton1Click:Connect(function()
						if game.ReplicatedStorage.Voting.Value == true then
							if currentVote == nil or currentVote ~= v.LayoutOrder then
								local sfx = Instance.new("Sound")
								sfx.SoundId = "rbxassetid://4676738150"
								sfx.Volume = 1
								sfx.Parent = script.Parent
								sfx:Play()

								game.Debris:AddItem(sfx,1)

								currentVote = v.LayoutOrder
								game.ReplicatedStorage:WaitForChild('Remotes').PlaceVote:FireServer(currentVote)
							end
						end
					end)
				end
			end
		end
	end
end)

Fixed it. Had something not running on my client local script which was causing it to break.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.