Hi yall, im working on a weapons system for an fps game. Rn, im basically just storing the ids of the sounds in a config file for all the weapons and just playing them when needed.
This is the code (all the weapons inherit from the base weapons class)
function BaseWeapon:_init()
…
local temp = {}
for i,v in self.Sounds do
local sound = Instance.new(Sound)
sound.Name = i
sound.SoundId = “rbxassetid://“..v
temp[i] = sound
end
self.Sounds = tem
…
end
Im just wondering if using SoundService would be better practice, as Ive heard all the weapon shoot effects, etc should be grouped together in there. I just need to make some sounds will play only for the client (eg reloading), and others are proximity (eg gunshots). Thanks!
** You are now Level 1! **