I have a question, how do I make a Group only uniform based on the team? For example, if you joined the Blue team (which have group bound) you'll get the uniform based on rank, but if you join Red Team, you'll not get the uniform because you're not in the Red team's Group?
Group rank and team based uniform?
2 answers
Example (If it is a roblox group) :
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(char)
if Player:GetRankInGroup(GroupId) == 255 and Player.TeamColor == game.Teams.Red.TeamColor then -- Change GroupId to group id
print("Player is the owner of the red group")
end
end)
end)
Just an example, if it is what you needed, for shirt changing you have to search for player shirt in character instance and change the id
9 comments
Where do i change the ID?
Player:GetRankInGroup(GroupId) Change GroupId
I've tried to Modify it by myself, but it didnt work like, even tho im not in that rank, im still getting the lower rank uniform, maybe if u have discord, I can message u on there
Weird, it should work. By the way, you have to change 255 to a rank ID from the group you want the player to be
I did, but whenever im in Guest rank (testing with alt), I get the 255 rank Uniform
https://cdn.discordapp.com/attachments/897174216829460515/950174486727110696/unknown.png | This is the Screenshot of the Output
https://cdn.discordapp.com/attachments/863272355160653825/950189308847988746/unknown.png | And here's for the Script that I modify
plr:GetRankInGroup() == 0 will give a shirt to guests
yes im trying to give it to guest, didnt even give to guest, it gives to Owner of group
Hiya! o/
I'd go through this by creating a folder somewhere (ideally ReplicatedStorage) where it contains the rank's uniforms in different folders.
The backend would listen for when the player changes their team
Player:GetPropertyChangedSignal("Team"):Connect(function()
-- Here I would get the player's team, and then rank in their group from that.
local Rank = 256
-- Then I would get the Folder for the rank
local Uniforms = game.ReplicatedStorage.Uniforms:FindFirstChild(Player.Team.Name):FindFirstChild(Rank)
-- Once I have the folder, loop through all children and replace any clothing in the character with the ones
-- supplied in the folder.
for __INDEX, Object in ipairs(Uniforms:GetChildren()) do
-- Get the type of the object, and do stuff™
end
end)
This system allows for easy expandability with clean code!
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
I want kindly remind you that this is not a REQUEST site. In case, you will try to figure out, it yourself and have any bugs or errors then post them here or as a new question. Add me at discord and I will help you in my free time.
Note: There are a million ways to achieve what you want to. My discord is: ErtY#9909
Ah okay thanks thanks