I'm trying to place two functions that plays a list of random sounds, one for when the class of: Murderer wins/loses and one for when the class of: Innocent wins/loses. Alright, so what's the problem? I don't know where the functions should be placed in the script. P.S. The audio should be placed in a way that it plays as soon as the text of "[Class] wins" shows up on the GUI.
event.OnClientEvent:connect(function(...) local tuple = {...} if tuple[1] == "Result" then if tuple[2] == "BloxxerWin" then resultname.Text = "MURDERER wins" resultname.TextColor3 = Color3.new(170/255, 0/255, 0/255) else resultname.Text = "PLAYERS win" resultname.TextColor3 = Color3.new(0/255, 170/255, 255/255) end resultprompt.Visible = true wait(7) resultprompt.Visible = false