I was making a fighting game but suddenly I think that what if it lags the server because I always spawn and deletes the sound effect folder?
If you guys can answer this small question then thank you, I dont want my game to have many lags!
why are you deleting and spawning the sound effects folder in the first place?
hi, just a question
how did you get that “UI designer” icon under your pfp?
Go to Preferences, then choose on Flair. To join a group you can just go to my studio profile, and click one of the links in Groups on the far right
Idk, Its just my coding that spawns a specific skill’s sound effect and later deletes it
But if I do that would It lag?
It may affect a bit, but probably not much of a problem. You could Play it then use debris service to clear them.
I would typically always play anything audio related through the players Client
or through a FireAllClients
event, one of the main reasons you don’t want to handle unnecessary things on the Server
if because handling things like VFX
and Audio
can cause strain and lag on the Server
which can affect how the game performs for players.
It also depends on the scale of Audio
you’re handling, if you’re rapidly spawning new Audio
objects in the game from the Server
it will affect performance however- Im sure on a smaller scale, playing audio on the Server
is absolutely fine.
a good example of using FireAllClients
would be:
- a
Player
uses an Attack or Ability, when displaying the VFX (by also usingFireAllClients
) you can simultaneously play the Attack / Ability audio without using theServer
at all
(although you can do this on the server too, it would be more efficient to handle it all in one script)
an example of using a single Client
for Audio would be:
- making a “Mute All Music” setting, of course, if that ran on the
Server
it would mute all music for ALL players, however because it’s local to that PlayersClient
, it only runs for them!
Hopefully this gives some insight to when you should use Client or Server audio
Tysmm, I’ll do cilent sided sfx more rather than server since the script spawns the SFX folder for a specific skill which can make the server lag
Also can I ask, if I made effects in cilent sided that kind of spawns and destroy parts rapidly or something similar,does it lags the cilent too?
Since I am fixing bugs in my games and I saw the PartCache module post where they say if I do that it could potentially lags the game.
basically anything to do with rapidly spawning parts / effects / objects should preferably be handled on the Client OR ALL Clients
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.