Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 5 years ago
Edited 5 years ago

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



0
At least try to code something, then give us what you coded, and tell us why it's not working. Internal_1 344 — 5y
0
yes i know im bad PVM_Pennsylvania -5 — 5y

1 answer

Log in to vote
0
Answered by
Zologo 37
5 years ago
Edited 5 years ago

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)    


Ad

Answer this question