So currently I’ve got a script set up to play a taunt sound whenever the player presses the key bind, and have it play a sound picked out at random from a table.
Problem is, once the table has picked out a sound it’ll only play that sound for the taunt and no other sounds.
As an example, it’ll pick a random sound to play, but once its picked it will refuse to play any other sound, like sound2 has been picked, it’ll refuse to play any other taunt sound from the table that isn’t sound2.
Please keep in mind I’m very new to using tables and haven’t had much experience working with them in the past, I’m sure the issue is fairly basic.
Script
Soundtab = { }
Soundtab[1] = "rbxassetid://6345613019"
Soundtab[2] = "rbxassetid://Exmaple"
Soundtab[3] = "rbxassetid://Exmaple"
Soundtab[4] = "rbxassetid://Example"
local taunt = Instance.new("Sound")
taunt.SoundId = (Soundtab[math.random(1,4)])
taunt.Volume = 5 --sets the volume of the taunt
taunt.Pitch = 1 --Sets the pitch of the taunt
taunt.Parent = hrp --Parents the humanoid root part```