Hello!, recently I’ve seen several topic with something along the line of Remote Spam and how it’s crashing their game. So I’m just kind of curious if it is possible to crash a server with this code alone.
-- Local Script
for i = 1, 10000000 do
game.ReplicatedStorage.RemoteEvent:FireServer()
end
-- Script
game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function()
print("Called")
end)
I’m pretty familiar with how remote works but I’m not that good when it comes to dealing with exploiters. If the above code could crash the server then I tried to came up with a solution myself.
-- Local Script
local RemoteEvent = game.ReplicatedStorage:WaitForChild("RemoteEvent")
while wait(.3) do
print("Firing remote constantly...")
RemoteEvent:FireServer()
end
-- Script
local RemoteEvent
local function CreateRemote()
RemoteEvent = game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function()
if RemoteEvent then
RemoteEvent:Disconnect()
RemoteEvent = nil
warn("Disconnecting remote for 3 seconds")
wait(3)
CreateRemote()
end
end)
end
CreateRemote()
Thank you for the respond! I’ve checked out your code but and it seems pretty good although the problem will start to pile up if the game has a high memory. Meaning that you can’t really check if the player is exploiting or lagging
Thanks for the respond! but I can technically create remote for each players to use and apply the previous method to the remote and this time it detects player’s name and check if the name matches the remote’s name. If the name is different it’ll kick the player-in-question for trying to fire the remote that isn’t theirs. So that pretty much solved the exploiter trying to spam remote at the cost of multiple :Connections which shouldn’t be that big of a deal.