If someone says "/e sprinkler" or "/e cabbage", the script checks if they're in a certain group, if they are then they would perform the follow animations. If they aren't then nothing happens.
YourGroupId = "846314" function onPlayerEntered(newPlayer) game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(msg) if msg == '/e sprinkler' and newPlayer:IsInGroup(YourGroupId) then player.animationID = 149359445 if msg == '/e cabbage' and newPlayer:IsInGroup(YourGroupId) then player.animationID = 168149515
Thanks
You don't need onPlayerEntered, remove that. Also, when you have the event fire for PlayerAdded, you called the new player "player". On lines 6 and 8 you wrote "newPlayer" instead of "player". Just fix those things, and don't forget to write ends.