So I don't know how I would do this but I want to: A) make a script that once someone stands on a part then it changes their role in my ROBLOX group. or B) make a script that messages me somehow preferably on ROBLOX that a player wants to change to another role in my group and then i manually change their role.
Please help tell me if anything is not possible or if it is how I would do it I am very limited in scripting so any help is appreciated thanks.
For option A, this is possible but it requires you to have the ability to host an external server. Roblox provides APIs that allows you to communicate with the platform as a whole that you can manipulate with a web server. You can download node.js for building the basis of the web server and you can build the app yourself Express to handle the actual web server and Axios for providing a client that handles HTTP requests. Alternatively, you can look into noblox.js, which is a wrapper that allows you to communicate with Roblox's API, or possibly open-source auto-rankers.
I personally don't use noblox.js, so here's what I do to handle it on the external server by myself. You'd also have to make your server in a way that it accepts the player's userId as a parameter, perhaps as a query, i.e: the ?name=value
in URLS, path (for example: https://scriptinghelpers.org/questions/121661
. "questions" and "121661" are paths), or request body
.ROBLOSECURITY
cookie: you can search google to find how to get thishttps://auth.roblox.com/v2/logout
with the Set-Cookie
header set as .ROBLOSECURITY = your found cookie
. This endpoint returns a X-CSRF-TOKEN
in the response headers: very important header heregroupId
parameter in the parameter list below and click "Try it out!". The page will make a request to the endpoint and the response body will be shown below. Take the id
of the role that corresponds to the necessary role name you want the user to be changed to.https://groups.roblox.com/v1/groups/{your_group_id_here}/users/{user's id here}
. In the request body, set it to {"roleId": paste the role id of the role you found here}
. In the headers, set the Cookie
header to .ROBLOSECURITY = your cookie here; X-CSRF-TOKEN = the x-csrf-token you got from the authentication endpoint
. If you've done everything right, the user's role should be updatedIf you're not gonna bother with that, you can go with plan B, which is also possible, and use webhooks that sends the player's name. You can't be dmed by a webhook, but you can make a reserved channel for the game to send messages as requests to change a player's role. Check this out