#Need help with Huge lag cz of Parts
1 messages · Page 1 of 1 (latest)
Depends. What exactly do you mean by "physics only". What kind of "machines" are we talking about.
like this
and 20 more like this
What exactly is that
basically a man swinging sword while the zombie is spinning around and moving its arm
How do you even achieve that without scripting.
i can like show you somehow
alr
Oh. With HingeConstraints
Does it need to be physic based like that tho? Because if not you could just use an animation. That would probably reduce the lag a lot
I would like to keep it like that since i cant animate or script
i tried to write a script where the parts dissappear if they are 20 studs away
but the faces and the moving parts didnt dissapear
- the whole terrain was gone
and i believe the game still processed the parts cz some of the machines was broken
** You are now Level 1! **
well. I am pretty sure that even if you make them dissappear that won't make the lag go away. You should try simulating more things on the client but that requires you to write scripts.
so that means that some of the parts will run on my pc and not the server?
That would be more ideal. Because if the parts run on the server their information will have to be sent to every client. If they are run on the client then the server won't have to send information to every client.
And do you have a tutorial to make this happen?
move them to replicatedstorage and back again
Not really. Its just a thing i learnt while dealing with Projectiles. Could you go more in depth about your game mechanics / game loop?
if it lags he should do more on the server
why
why would making MORE on the CLIENT reduce lag
its just about showcasing my "animations" with only physics
because of NetworkBandwith
but there is too much stuffs going on which breaks the machines
Do you need to run all of your machines at once tho?
Could perhaps make it so only some run when the player decides to view them
i tought he would get low fps
Well
it would be good but idk how to script it
If its because of network just keep all machines in replicatedstorage and move them out via. code
to like only see the parts which are inside the 20-30 studs area
then they will be rendered on every client individually
and do not try to sync with every client
use a client script in starterplayerscripts for this
wa. Could you check your Perfomance stats. So we can see what causes the lag
40 should be alright tho. And what about your fps
its good in game
its not me who lags
but the machines

i dont know how to move them out from there via scripts 
- Make a Folder in ReplicatedStorage
- Move all your models (ur machines) in there
- Run smth like this in
game.StarterPlayer.StarterPlayeerScripts.moveModels.luau(ur script is moveModels.luau, its just a local script)
-- Contents of moveModels.luau
local FOLDER = game.ReplicatedStorage.Folder --replace "Folder" with ur folder name
local function moveModels(folder)
local models = folder:GetChildren()
for _, model in models do
model.Parent = game.Workspace
end
end
moveModels(FOLDER)
thank you i try it
** You are now Level 2! **
show me ur script
i dont have a script, i cant script 😭
i just made a local script and put that into it
and ran the cmd..
Custom physics 🤣
i'll try to find a youtube video about it
thanks tho for helping
np
WTF bloody hell is this sorcery?
yo i made a lightbulb with no electricity
lanterns
takes less time to create, with inefficiency
i js realized thats a smooth brain emoji
i did not mean to diss you bro
But to make your game work context to how it works is needed

Without scripting your options are accepting the lag or nuking the # of parts you have
** You are now Level 5! **
Load them locally if players don’t need to interact and load them only near the player