I have a problem with remote events, please help

so i want to make a script that counts time and share the time across the server. However, for some reason it doesn’t work as intended.

Here is the script that counts the time:

local UIS = game:GetService("UserInputService")
local plr = game.Players.LocalPlayer
local CombatRelated = plr:WaitForChild("CombatRelated")
local CanPerformAttack = CombatRelated.CanPerformAttack
local BlockEnd = game.ReplicatedStorage.Events.Katana.Block.BlockEndCool

local DidBlock = false
local Time = 0

UIS.InputBegan:Connect(function(Input)
	if Input.KeyCode == Enum.KeyCode.B then
		if CanPerformAttack.Value == true then
			DidBlock = true
			while DidBlock == true do
				wait(0.1)
				Time = Time + 0.1
				UIS.InputEnded:Connect(function(Input)
					if Input.KeyCode == Enum.KeyCode.B then
						if DidBlock == true then
							DidBlock = false
							BlockEnd:FireServer(plr,Time)
							Time = 0
						end
					end
				end)
			end
		end
	end
end)

and here is the script that receives it:

local BlockEnd = game.ReplicatedStorage.Events.Katana.Block.BlockEndCool

BlockEnd.OnServerEvent:Connect(function(plr,Time)
	print(plr, Time)
end)

but for some reason the output is
Temeraire149 Temeraire149

Thanks,
Tem

The player is automatically the first variable in a remote event.
You will need to change this:

BlockEnd:FireServer(plr,Time)
--to
BlockEnd:FireServer(Time)

but, what do i do if i want to print the time and the one that fired the server

Because its automatic, it is added as the first variable from the remote event.
So basically

BlockEnd:FireServer( (LocalPlayer-Added Automatically) ,Time)
BlockEnd:FireServer(Time)--This is that ^^^

--On Server:
BlockEnd.OnServerEvent:Connect(function(plr,Time)
print(plr)--LocalPlayer that was automatically added
print(Time)--Time

Wiki Link:RemoteEvent | Documentation - Roblox Creator Hub

thanks, now all my FireServer() lines will be more shorter from now on, and it solved my problems.
Tem