Weird issue with remote event (solved!)

I have ran into a problem with my remote events, this script:\

local rs = game:GetService("ReplicatedStorage")

local remote = rs:WaitForChild("remotes"):WaitForChild("SendTrade")

remote.OnServerEvent:Connect(function(plr,Target,Key)
	if Key ~= "Hacks#123" then plr:Kick("Firing remote events")end
	
	print("recieved the event")
	remote:FireClient(Target,plr)
end)  

prints “recieved the event” twice. The problem is that I only fired it once. (Using prints to check, I also made sure no other script was firing the remote event)

Here is the script that fires it:

sendTrade.MouseButton1Up:connect(function()
	print("clicked")
	if selected then
		if selected == plr then
			game.ReplicatedStorage.remotes:WaitForChild("TriggerMessage"):FireServer("Can't send a trade to yourself","Classic",true)
		else
			print("fired")
			remote:FireServer(selected,"Hacks#123")
		end
	else
		game.ReplicatedStorage.remotes:WaitForChild("TriggerMessage"):FireServer("Please select someone to trade with","Classic",true)
	end
end)

Any help is appreciated

Maybe u can use debounce here (not sure tho)

I don’t want to do that as it won’t be the most efficient fix and it doesn’t really explain why this is happening.

Could I see the layout of your scripts in the game? The only way I could see this happening is if there are multiple copies of the server script.
On another note, the key you send from the client through remotes is entirely useless, exploiters can see anything on the client, including that key. Sanity checks are always better than keys or other odd methods.

Also, I’m wondering why you are having the server create the error messages?

I managed to fix the issue.

How would I go about doing a sanity check?

I’m making a trading system and the remote event is sent to the server and then to the client to show the trade request on their screen.

Check solution mark.
And, policyservice is needed for that trade request thingy.