Honestly, have no idea why this is happening.
It plays fine everywhere else but my machine and I’ve never had an issue where a sound doesn’t play. I do also know that the sounds are loaded because I added a button to play a random sound.
The PlaySound events from the server make the client play the sound.
They are being sent, and no errors appear in the console, so i have no idea why they aren’t playing.
Studio Video: https://youtu.be/CnWNVB5DSm4
Mobile Video: https://www.youtube.com/watch?v=P2wetYA0J_s
Video where sounds aren’t playing: https://youtu.be/ktcjovO_WCY
elseif eventType == "PlaySound" then
local soundInfo: {string: any} = ...
local position = SoundService.InGame
if soundInfo.position then
position = MapModel.SoundPos:FindFirstChild(soundInfo.position)
if position == nil then warn("could not find position", soundInfo.position) return end
end
local soundInstance: Sound = SoundService.Sounds:FindFirstChild(soundInfo.soundName, true)
if soundInstance == nil then warn("Could not find sound", soundInfo.soundName) return end
soundInstance = soundInstance:Clone()
soundInstance.Parent = position
if soundInfo.Volume then
soundInstance.Volume = soundInfo.Volume
end
if soundInfo.RollOffMode then
soundInstance.RollOffMode = soundInfo.RollOffMode
end
if soundInfo.MaxDistance then
soundInstance.RollOffMaxDistance = soundInfo.MaxDistance
end
if soundInfo.MinDistance then
soundInstance.RollOffMinDistance = soundInfo.MinDistance
end
soundInstance:Play()
if soundInstance.Looped then return end
delay(soundInstance.TimeLength, function()
soundInstance:Destroy()
end)
elseif eventType == "StopSound" then