Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How would I make a Uniform Giver when you are on a team for certain ranks?

I am working on my group, and I made uniforms for people that are on the same team, so per say if they were in group, and rank in group, and on team they would be given this certain uniform, thanks Edit: and there are other teams

game.Players.PlayerAdded:Connect(function()
	local player = game.Players:GetPlayerFromCharacter(character)
	if player:IsInGroup(0000) and player:GetRankInGroup(0000) and player.Team == 'Team Name' then
		player.Shirt = "ShirtID"
		player.Pants = "PantsID"
	end
	

	

2 comments

0

At least try to code something, then give us what you coded, and tell us why it's not working.

0

yes i know im bad

1 answer

Hello, you can try this:

game.Players.PlayerAdded:Connect(function(player)

	local character = player.CharacterAdded:Wait()

	if player:IsInGroup(group-id) and player:GetRankInGroup(rank-id) then

		if character:FindFirstChild('Shirt') then
			
			character.Shirt.ShirtTemplate = 'rbxassetid://id'

		else
			
			local shirt = Instance.new('Shirt')
			shirt.Parent = character
			character.Shirt.ShirtTemplate = 'rbxassetid://id'

		end


		if character:FindFirstChild('Pants') then
			
			character.Pants.PantsTemplate = 'rbxassetid://id'

		else
			
			local pants = Instance.new('Pants')
			pants.Parent = character
			character.Pants.PantsTemplate = 'rbxassetid://id'

		end
	end
end)	
		
		

This discussion is preserved as it was. New answers, comments, and votes are closed.