I’m creating an RTS style game where you have for example sake. 10 units on each side. And each one of them attacks the enemy team and when they attack a sound plays.
Sword slash, rifle bullet. Etc… My issue is that even though I parent a new sound into each NPC, sometimes they wont play when there is more than 3-4 of the sounds playing. How can I solve this issue?
Can you provide some code and maybe a screenshot of the sound properties? (Assuming you are cloning a sound object and not crafting one via the script)
Try parenting it to the PrimaryPart of the npc. I don’t think it’ll fix it, but you can still try.
Try this:
function combat()
local rifleHit = script:WaitForChild("Rifle_Hit"):Clone()
rifleHit.Parent = NPC.PrimaryPart
rifleHit:Play()
end
Again, I don’t think it’ll work since it isn’t much of a change. Just kinda strange since it should be working as it is now. I’m at school and running off half an hour of sleep, so that isn’t helping me any
I also tried instead of cloning one, to just have one inside each NPC and play it. But it seems like once too many are playing it just stops playing them all together. I guess the studio has some crappy limitation of sounds playing at once. Sucks really, this is a huge part of what I will need for my game to work.