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