Does anyone know how to make this script?

Hello Robloxians! Recently I decided to make a new game but I stumbeled upon a problem. I made police team and here is the problem not all ranks have the same the same clothing soo if anyone knows how to make a script that gives You shirt,pants and t-shirt by their rank please help me.

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

Can you show what script you have made so far so I can assist you.

I’m on phone right now so I probably can’t assist you as much as you wish but couldn’t you just check the Players Team and then change the Shirt ID dependant on what team?

I am not a scripter only thing I done was make for each rank a uniform but that was to messy and people that are not that rabks would be taking higher ranks uniforms.

Only problem is that all ranks are on the same team.

Like ranks as in a group? You’d need to give an idea on how your rank system is done.

Like if You are corporal You get uniform for Corporals.

First of all U should know how to script man, Ur kinda asking us to write entire systems for u and that kinda sucks

Not the whole just how to get started

U would first need to check the rank that a player has and depending on the rank load the required clothing

GetRoleInGroup(My group ID) like that?

Well Idk man im just giving you Ideas, Im learning too so im not sure about what needs to be used in order to achieve this…

Here is a link in getting the rank in a group:

To apply the shirt id to the player, just change the shirt inside the player:

The rest is to combine those two. Using a script of course.

I’m not home but yes, you would use GetRoleInGroup and do some if statements.

I will try that,thank You so much.

Here I understand scripting from scratch can be a little hard so I’m going to give you a little guide:

	if plr:GetRankInGroup(GROUPID) >= 255 then
	elseif plr:GetRankInGroup(GROUPID) == 45 then
	elseif (plr:GetRankInGroup(GROUPID) == 45) and (plr.TeamColor == "Black") then

So I’m going to explain this code:
The first line


This code gets the service “Players”, so think of that all the players. It then waits for a new player to join the game.
It then creates a function with the parameter of the player that joined. (plr)

if plr:GetRankInGroup(GROUPID) >= 255 then

This line sees if the player is in “GROUPID” and is greater than or equal to 255 (the owner).
If this is valid then it does whatever you want it to do.
The line after is just the same example but for RANKID 45

elseif (plr:GetRankInGroup(GROUPID) == 45) and (plr.TeamColor == "Black") then

This line sees if the player is in the group (rank 45) and is on the teamcolor of “Black”
Obviously this wont necessarily work on join as you’d need to team them before it sees their rank.
But if you have a morph/uniform giver then this will be useful to make sure they’re on the correct team and correct rank to get their uniform.

I recommend this tutorial online for changing the shirt/pants:

1 Like