I want to give other players pets and by doing so I do the command game.Players.OtherPlayer.Pets.PetName.Value = owned ^ this doesnt work though. I just get this error: -- console:1: invalid argument #3 (string expected, got nil) the pets are managed by stringvalues in a pets folder in the player, if a stringvalue(so a pet)'s value is set to "owned" it will put the pet in your inventory. and if the value is unowned, it will take it out of your inventory and or you just wont have the pet
✓ ANSWER ACCEPTED
How do I change a StringValue whilst in-game and through the F9 Console?
1 answer
✓ Accepted answer
Strings have to be put in quotation marks. Try this:
game.Players.OtherPlayer.Pets.PetName.Value = "owned"
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Since it's a string value put it in quotation mark. E.g. game.Players.MarkedTomato.Pets.PetName.Value = "Something"
Did my answer help? If so please upvote and mark as answered!