I was browsing through ScriptingHelpers to find a solution to my problem, and only found this result.
However this did not work, even in the testing environment in studio, and in-game.
What solution would there be that actually works?
I was browsing through ScriptingHelpers to find a solution to my problem, and only found this result.
However this did not work, even in the testing environment in studio, and in-game.
What solution would there be that actually works?
put this in a roblox localscript
local sound = Instance.new("Sound", workspace)
sound.SoundId = "rbxassetid://IDHERE"
sound.Playing = true
sound.Looped = true
if game.Players.LocalPlayer.Name == "YOURNAME" then
local sound = Instance.new("Sound", workspace)
sound.SoundId = "rbxassetid://IDHERE"
sound.Playing = true
sound.Looped = true
end
you can use this on events, the sound on plays to the player if its in a local script.
Hmm, but this ended up playing it to the server, not a sole player.
are you sure? It's a localscript it shouldn't - try an event to fire the sound script (1st).
Oh, sorry, my friend tried playing audio at the same time as me. It worked :)! Thanks!
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
youl could also use:
SoundService:PlayLocalSound(soundObject)