-- Mobile Task Force / Security Department Chatvoice --Variables correctTalk = "RM" correctTeam = "Mobile Task Force" --Code Below game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(msg) if msg == correctTalk then if player.Team == correctTeam then print("MsgDeliverd") game.Workspace.RM:Play() print("Everything went fine!") end end end) end) -- Made by SpinnyWinny -- Credit to, OfcPedroo
The script in all its glory. But I got a few questions for you about it
A) How can I make it so the player emits the sound not the game B) Why doesnt it work now ;-;
I'll help you again!
You want the player to play the sound, right? Then you have to copy the sound to its head. I also added debugging options, to make sure the team you put exists. Also fixed the correctTeam path, because you forgot to add "game.Teams" in it.
-- Mobile Task Force / Security Department Chatvoice --Variables correctTalk = "RM" correctTeam = game.Teams["Mobile Task Force"] --You had to put behind game.Teams. I fixed it for you, but still, make sure that team exists. --Code Below game.Players.PlayerAdded:connect(function(player) repeat wait() until player.Character --Some debugging options if correctTeam == nil then --If Mobile Task Force isn't a team, that warn will show up in the output. warn("Debugging option: "..correctTeam.." doesn't exist. Make sure you didn't mistake in the path.") end local clone = game.Workspace.RM:clone() clone.Parent = player.Character player.Chatted:connect(function(msg) if msg == correctTalk then if player.Team == correctTeam then print("MsgDeliverd") player.Character.Head.RM:Play() print("Everything went fine!") end end end) end) -- Made by SpinnyWinny -- Credit to OfcPedroo
If that works, please mark as the solution!!!
As always, good scripting!