Hi, I recently asked a question and it was solved here's the question if you want to see:
But I'm having a new issue where the sound can only be heard by the player. I still want the sound to be able to be played during an animation and have it so people around the player can hear it. Any help I can get is appreciated.
Here's the script so far:
wait(.5)
Player = game.Players.LocalPlayer.Character
animation1 = Player.Humanoid:LoadAnimation(script.Animation1)
animation2 = Player.Humanoid:LoadAnimation(script.Animation2)
animation3 = Player.Humanoid:LoadAnimation(script.Animation3)
CanEmote = true
game:GetService('UserInputService').InputBegan:Connect(function(Input, GameProcessed)
if not GameProcessed and Input.KeyCode == Enum.KeyCode.P then
local emote = math.random(1,3)
if emote == 1 and CanEmote == true then
Player:WaitForChild('Humanoid').JumpPower = 0
Player:WaitForChild('Humanoid').WalkSpeed = 0
script.Sound1:Play()
animation1:Play()
CanEmote=false
wait(1)
Player:WaitForChild('Humanoid').JumpPower = 50
Player:WaitForChild('Humanoid').WalkSpeed = 16
CanEmote=true
elseif emote == 2 and CanEmote == true then
Player:WaitForChild('Humanoid').JumpPower = 0
Player:WaitForChild('Humanoid').WalkSpeed = 0
script.Sound2:Play()
animation2:Play()
CanEmote=false
wait(1)
Player:WaitForChild('Humanoid').JumpPower = 50
Player:WaitForChild('Humanoid').WalkSpeed = 16
CanEmote=true
elseif emote == 3 and CanEmote == true then
Player:WaitForChild('Humanoid').JumpPower = 0
Player:WaitForChild('Humanoid').WalkSpeed = 0
script.Sound3:Play()
animation3:Play()
CanEmote=false
wait(1.5)
Player:WaitForChild('Humanoid').JumpPower = 50
Player:WaitForChild('Humanoid').WalkSpeed = 16
CanEmote=true
end
end
end)

3 comments
I'm trying to get it so it can't be heard from people far away, only the people who are close by the animation. Basically I want the sound to play from the character's head.
That is called sound region. Perhaps watch this video: https://www.youtube.com/watch?v=L_Jga2MgRdU
Can I use the sound regions while moving? Basically this script is like a taunt for a game