Locked & concluded

CONCLUDED/LOCKED
Thanks for the answers

You have a whole memory leak. You should always avoid connecting events in a loop without disconnecting it so I suggest you make the connection independent of the loop. Also, your system sadly isn’t as efficient as you think. Firstly, it’s not hard for exploiters to spoof the remote event while also being able to detect when the localscript was inserted and deleting it. Secondly, you aren’t taking into consideration your script giving some false-positive while proceeding to kick/ban the player because of players with poor connection which means you are assuming every player will be able to successfully fire the event under the span of your wait time

Yep I just realized that, besides the deleting part. When they delete the remote won’t fire, as result they will be kicked. Do you have any idea how I can fix those memory leaks?

When attempting to script any client sided anti-cheat, always keep in mind that an exploiter can do everything a local script can do (including but not limited to firing a remote event, creating and destroying an instance, modifying properties of their character, faking events like “basepart.Touched, ProximityPrompt.Triggered”, etc) and even things a local script can’t do which is why client sided anti-cheats are useless for the most part against a smart enough exploiter. As for the memory leak, taking the event connection in the server script out of the loop should do the trick.

Yep I fixed the memory leak like that. And yea doing a cleîent sided one isn’t good but it’s only the small part of my server-sided one. Now another issue I have is that when I clone the scripts to the player, all fire the remote but not all are received from the server? Is that cause they are all literally simultaneously fired?

Did you test it with multiple player because I’m not sure I understand

Yea I just realized my sentence forming, sorry for that. So I’m testing it in the local studio servers with multiple players. They all fire the remote but the server doesn’t receive all.

Can I see an image of the output since you have some print statements and what your current server script looks like

In the local script, can you add a print statement after firing the event and tell me if every player prints the statement like this :

print(plr.Name.." has fired event")

If they all do and the remote event only receives from one player then maybe its a studio test thing

I have that it prints in the player tabs tho. Thats’ how I know that they fire

I didn’t read the local script sorry. I suggest you test it ingame to see if it also happens in game

Wait can you take a picture of replicated storage’s descendants after the event is fired

I don’t understand what that means

I have no idea as to why that might happen