How to fix lag for game

Me and some peeps made a game called Soda Legends and for some reason people are complaining that they’re lagging a lot? I was wondering how we can fix this.

https://www.roblox.com/games/5817229607/2x-Luck-Soda-Legends?refPageId=35a8fd45-d6e7-420f-9d0f-7a2954535b45

1 Like

There is most likely an expensive code around or perhaps a malicious script. Depends a lot by checking it yourself. Or by any other chance, poor script practices.

1 Like

There can be several reasons.
Though i would link the lag to poor scripting structure or a virus.
Other than that, it could be due to excessive parts or unions.

1 Like

I suggest getting this plugin: Ro-Defender™ Plugin v8.7 - Roblox
to make sure you have no viruses and if that doesn’t work, if you can try making “places” which you will be teleported to for certain things. This would reduce the amount of work your computer has to do.
More info on places:Publishing Experiences and Places | Documentation - Roblox Creator Hub.

Your script named Client is taking way too long to execute, especially since it’s being fired on RenderStep. It takes up 2 out of the 16 ms in each frame for 60 fps on my computer, though I’m sure it would take a lot longer on lower-end devices.

I suggest you to look at this, usually lags can occur due to backdoors or a lot of textures/scripts.