So i am trying to make a command where i can award a player a badge ingame
Do you guys have any idea how to do this?
Command needed: ;Awardbadge (username) (badgeid)
Can you guys help me?
So i am trying to make a command where i can award a player a badge ingame
Do you guys have any idea how to do this?
Command needed: ;Awardbadge (username) (badgeid)
Can you guys help me?
Try the Assistant in Studio.
Go to the View tab and select Assistant.
You can type in what you’d like the script to do and the assistant can give you a basic script that covers most of the stuff you want.
Read up on this:
This is an example of where it’s used to award a badge when the player joins the game.
If you want to use it in multiple instances (example: player joins the game, defeats a boss, kills a player, wins game, etc.), it’s best to code the function in a ModuleScript and then call it when you need it from there.
If you want to know how to code the command part of the function, that’s something that you’ll have to learn yourself. It’s quite easy though, you just need to use the ChatService and split the received message with message:split(" "), so you split the text in spaces.
You can get the player parameter from the username (second part of the message, so message[2]), and the badgeid in the same way (third part of the message, so message[3]).