Anyway to reduce game lag?

I was testing out my game, but its super laggy as a published game, i tested in the studio as a local server too it was nvr this laggy, anyone know how do i reduce the its lag? cuz i dont think its scripts or hardware problems since it runs perfectly fine in studio, and i dont think its internet problem too, i’ve been testing my speed it was always around 90mbps, maybe its because there are too many functions running at the same time?
here’s wat its like in studio/ when its not laggin : https://gyazo.com/ba94dd7e4221904369ee3dee41c84e36
here’s wat i mean lag : https://gyazo.com/e64f8f14d9b3ffc82b27cba977b7e251
the lag doesnt always come in with a rhythm, it just came in randomly so in the upper gif its mostly laggin the 1st combo and the 2nd combo, and also the effects for the 4th combo
plz, anyone help??
EDIT: this lag happened just today the last time i tested this wasnt happening, but i have made alot of “updates” since the last time, so may still be caused by script i suppose

Are the combos all ran on the server?

yes everyone of my scripts except 1 local script used to fire events, the rest of em are all ran on server, stored in module scripts

1 Like

You could do all the visual effects on the client to reduce delay/lag and on the server just do the hitboxes

i guess that could be a way, but then the other plrs cant see the effects :frowning:
and these werent happening the last time i tested, this character in the gif were even made since the first time the place was published, the effects are all the same too, and there wasnt rlly any lag

Use a fire all clients event to send it to everyone

1 Like

Yes they can, when firing to the clients do :FireAllClients(PlayerToDoEffectsOn) and go on from there.

(Like @DybalaplaysYT said )

1 Like

so i just reverted the game to when it dont lag, to my surprise its laggin :frowning: i’ll still try the fire all client thing,
but do u have any idea it might be?

1 Like

Go to lighting and turn GlobalShadows off

but the lighting was always on in the older versions, i just reverted it to an old version that wasnt laggin, but now its laggin

its because Roblox Studio dont lag as much as the roblox player

im afraid u didnt get the full picture here, the game just started laggin today, as an experiment, i reverted it to a version thats atleast 1 month old, which i personally tested wasnt laggin at all, atleast not in the same way i experienced today, but now its lagging, so that leads me to believe that the lag isnt caused by the lighting or the scripts either

It probably is because the information from the server to client has a small delay and it causes it to look like that, everything ran on the client will run faster (animations, visual effects, etc…), and this way you also won’t overload the server.

UPD: the lag is not appearing this morning anymore, it seems to be a problem of roblox itself, but not sure yet, it looks game breaking to me, so still finding a way to completely avoid it in the future, so this draft will still remain open