Heavy Lag after Publish As

I want to remove the sudden lag that appeared in my game.

I tried using an Anti-virus plugin on my game and it broke a couple of scripts and I didn’t know until I made some actual progress, so I took a copy of the game then reverted it back before the Anti-virus, I took the missing scripts and used the copy I took of my game to “Publish As” then added the scripts, the game worked fine but the issue was LAG, Throwing projectiles would lag you horribly even for small ones, this wasn’t happening to my game before I used publish as and I’m sure the anti-virus didn’t delete anything crucial (I have tested)

I created a little script that tracks remotes, while remotes DO SPAM somtimes it was happening in the game before and it didn’t lag, I’ve also looked in the script performance tab and found nothing out of the ordinary

My guess is that Publish As is the culprit but I’m not sure how to fix it.

Publish As would not affect the performance of your game. If the game was working fine before messing with the Anti-Virus plugin, I would continue looking for any missing scripts or lines of code that might have been removed by it. Since the Anti-Virus plugin removed some scripts, I would also be heavily sceptical of those scripts in particular, for lines of code that are artificially introducing lag into your game. Depending on the Anti-Virus you used, they are pretty good at avoiding false positives.

yes. publish as has issues in roblox. i have noticed sometimes after using the publish as feature, my servers slow down a ton and teleporting seems to break all together. I recommend not using publush as. Usually after the initial publish as “break” i had to wait about 30 minutes for things to go back to normal, often being forced to roll back specific updates.