Remote event not getting every information

As you can see from the image below I tried to send 2 object’s to the server but ended up with just 1.

Screenshot_5

What I’m guessing is that since both have the same name the server just ignores the other one since it’s from the client the server does not believe that the other one exist.

RECIEVING

local event = script.Parent:WaitForChild("RemoteEvent")
local debounce = false
local lastCall = {}

event.OnServerEvent:Connect(function(player, data)
	if not lastCall[player] then
		lastCall[player] = {tick(), {0, tick()}}
	else
		if (math.max(tick() - lastCall[player][1], 0.001)) < 0.3 and (tick() - lastCall[player][2][2]) > 5 then
			lastCall[player][2][1] += 1
			lastCall[player][2][2] = tick()
			warn(player.Name.." is consecutively fireing the event. "..lastCall[player][2][1])
		end
		
		lastCall[player][1] = tick()
	end
	
	print(data)

	for _, v in pairs(data) do
		v[1]:TakeDamage(v[2])
	end
end)

SENDING

local animationId = {{9446755252, 0.3}, {9446990358, 0.3}, {9449086272, 0}}
local animation = Instance.new("Animation")
local loadedAnimation = {}

local event = script.Parent:WaitForChild("RemoteEvent")
local sword = script.Parent.Parent:WaitForChild("Katana")

local comboCount = 1
local lastSwing = tick()

local players = game:GetService("Players")
local player = players.LocalPlayer
local mouse = player:GetMouse()

repeat wait(1) until player.Character and player.Character.Humanoid and player.Character.HumanoidRootPart

local character = player.Character
local humanoidRootPart = character.HumanoidRootPart
local humanoid = character.Humanoid

local debounce = false
local canDamage = false
local data = {}

for i = 1, #animationId do
	local animation = Instance.new("Animation")
	animation.AnimationId = "rbxassetid://"..tostring(animationId[i][1])
	table.insert(loadedAnimation, humanoid:LoadAnimation(animation))
end

function combo(count)
	humanoidRootPart.CFrame = humanoidRootPart.CFrame * CFrame.new(0, 0, -1)
	loadedAnimation[count]:Play()

	wait(animationId[count][2])
end

mouse.Button1Down:Connect(function()
	if not debounce then
		debounce = true
		canDamage = true
		data = {}

		local extraDelay = 0

		if (tick() - lastSwing) > 0.7 then
			comboCount = 1
		else
			comboCount += 1
		end

		if comboCount > 2 then
			extraDelay = 1
		end

		combo(comboCount)
		lastSwing = tick()

		if extraDelay ~= 0 then
			canDamage = false
			event:FireServer(data)
			
			
			wait(extraDelay)
		else
			canDamage = false
			event:FireServer(data)
		end
		
		debounce = false
		print(data)
	end
end)

sword.Touched:Connect(function(hit)
	if canDamage == true then		
		if not hit:IsDescendantOf(character) then
			local eHum = hit.Parent:FindFirstChildOfClass("Humanoid")

			if eHum and not data[hit.Parent] then
				data[hit.Parent] = {eHum, 5}
			end
		end
	end
end)

Can you please provide the sending and recieving script?

It’s just the simple dictionary and sending it to the server.

That’s… not the script though? It could be something wrong in the code, which is what I want to check. Not many lines are needed, just the bit before/after the send/recieve code

I’m not sure since it’s just event:FireServer(data) for the client

You still are not providing the required information to debug the program

Edit: OK, you added the code to the original post. I’ll check it out

When you expand the ["(Dummy)"] = > {...}, what does it show?

Non string indices will be converted to strings when passed through a remote event

[" (Dummy)"] =  ▼  {
                       [1] = Humanoid,
                       [2] = 5

It’s weird that it goes from 2x Instance(20B1E2E2218)] to 1x Dummy…
Is the expanded form of the Instance things the same as the dummy?

It say’s here;

so why does dictionary turn’s [Instance] to ["(Dummy)"]

Yeah both are the same both exist in the workspace

[Instance(20B088D7828)] =  ▼  {
                       [1] = Humanoid,
                       [2] = 5
                    },
[Instance(20B088D7F68)] =  ▼  {
                       [1] = Humanoid,
                       [2] = 5

You can do RemoteEvent:Fire(Instance).
But if you do

RemoteEvent:Fire({
[Instance] = ...,
})

It will convert to a string.

Oh so since mine is A instance that would be converted to string so that mean’s that the server think’s they are the same since both have the same content.

Instead of sending Instance I should just use table.insert()

If you want to see if it is indeed the double up causing an issue, you may be able to add a 3rd variable to the data, representing the number of times it needs to be fired (1st variable = humanoid, 2nd = damage, 3rd = time hit), then just loop it for that number of times

Oh that make’s sense since the hit have different instance, I’ll try that one.

yeah no, the server just take’s the first Instance and the second instance just get ignored since they have the same name meaning the table [" (Dummy)"] is just the same as the other one.

Did passing the third variable within the data have any effect on it?

Im referring to something like this:

[Instance(20B088D7828)] =  ▼  {
                       [1] = Humanoid,
                       [2] = 5,
                       [3] = 2 --Times occured
                    },

Passing the third variable did not make any difference.

What was the updated code to put the 3rd var