Ok so. I have idea about store all sounds for example M416 gun. In one sound instance. And use it with new time position. To stop sound we need use debris. Would it be cheaper to use and helpful?
Not sure if thats possible but you should probably put it in platform feedback or Discussions
Oh discussion, sry. I didn’t know rly where put it. So i posted here. I will use discussions in next time.
It could be better, but the current way of storing sounds is pretty easy and fast, why not use this one?
What current way? Storing sounds in folder or what.
Are you talking about RB studio or some other platform? I am confused…
RB studio for sure. Lemme give you vid what im talking about
Here:
I can’t understand. Don’t people upload the sounds in Roblox and then use a Sound component in Sound Service?
What do you mean by “to stop sound we need to use debris”, I can think of about 4 other ways to stop sound?
Ik ik, but im taking abo cheaper method. Like instead of many sounds, isnt better just upload one sounds with all sounds as 1 instance.
Ye ik, but i wont thousands of sounds in one player
No, people don’t really do that unless your creating a global ambiance sound.
Most people store sounds in the relevant places / such as tools, objects, scripts etc. What is relevant to the script at the time.
It would defiantly be time saving and it would ease the player’s device, but I don’t see why it would be cheaper…
No its not as all sounds TIME_LENGTH would be same as all other sounds COMBINED further more Seprating Load makes it faster
local sound = nil -- your sound here
local t = {
["walk"] = {2, 0.5} -- sound name = {start pos, length}
}
local function play(n)
sound.TimePosition = t[n][1]
sound:Play()
spawn(function()
wait(t[n][2])
sound:Stop()
end)
end
play("walk")
something I just tried, might be relevant idk (make sure to put it in localscript (to much delay if in serverscript)
It won’t be faster neither would it save time much
even if it does probably would be 0.2-0.7seconds
Yes, like this.
(30 charsss omg)
And im thinking would it be more useful or cheaper instead of uploading every sound.
I actually considered doing this however, there might be issues with possible delay, audio loading, etc. If the audio doesn’t load, all the sound effects wont load, if the audio is delayed, players can hear the other audio at times.
It might be cheaper but it really depends. If you can pull it off well then props, go for it. If there are issues, then you may have a trouble of a time.
I think what you have to decide is how your sounds intertwine with one another.
If the sounds are always going to be played in series no matter the case then you may as well merge them into one sound - this would then reduce the threads time because it doesn’t have to constantly yield for completion to do them in series.
If the sounds are seperately played on a case by case basis e.g. sound for slash of sword, sound for firing of a gun. then its more efficient to have the sounds stored separately and playing them when they become relevant at the time.
Essentially whatever method leads to less maths, yielding and waiting is what you want in the end.