Hello, there’s something strange about the game I’m developing. When I’m playing alone I don’t encounter any lag, everything goes fine, but as soon as 2 or 3 other people join me I start to experience lag, I lose fluidity. As far as I know, there’s nothing that can cause this. The only thing is that for each client there’s a ‘Pet’ with bodyPosition and bodyGyro that I create in the server, I give the NetWorkOwner to the players and I update the positions in a local script, in a loop, every 0.075 seconds (this shouldn’t, I imagine, cause lag, especially for 2/3 players) (I use bodygyro and bodyposition because I prefer their visual rendering to AlignOrientation and alignPosition).
I’m just wondering if the problem might not come from the fact that: the game is a round system, and at the start of each round (or when a player joins the game during a round) I clone a local script from the server that I put in the Gui players and activate (all from the server). Do you think that creating the scripts and activating them from the server could cause some kind of replication or something that could justify the lag? I precise that this local script handle the whole game , with a loop of over 220 lines (but as i said, when i’m alone it’s perfectly fluid, even on a mid device)
Thank you for reading and for your help ! =)