i dont know where to place animations and sounds. and how should i play it? should i just clone the animation/sound when i want to play it? no clue whats the most optimal way
if you’re looking for an optimized way to do sounds/animations one way to do it (at least the way i do it)
is to set up a module in replicatedstorage (so the client and the server can reach it)
have something like this:
function module.CreateSound(SoundName : string, Volume : NumberValue)
and then go on to create the sound
NewSound.Name = SoundName
NewSound.SoundId = rbxassetid://..SoundID.Value
NewSound.Parent = SoundService
You can get the “Newsound” ID using this method
for i, SoundID in ipairs(SFXValues:GetDescendants()) do
if SoundID:IsA("IntValue") and SoundID.Name == SoundName then
SFXValues could be located anywhere you want
Just make sure to make a intvalue, make the value to your sound ID. And set the name of the intvalue to your sound name
Now this is really only needed if you have hundreds of sounds, cause they can cost a lot of memory
and for animations
you can do the pretty much the same thing
heres a post on optimization
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.