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

How can I assign clothes to a specific rank in my group?

Asked by 4 years ago
wait()
p = game.Players.LocalPlayer
groupID= 6998516


game.Players.PlayerAdded:Connect(function(p)
    if p:IsInGroup(groupID)and p:GetRankInGroup(groupID) >= 252 then
        p.ShirtTemplate="http://www.roblox.com/asset/?id=981314839"
        p.PantsTemplate="http://www.roblox.com/asset/?id=457649168"
    end
end)
0
Please outline specifically what you need help with and what your problem is so people can answer more in-depth. WideSteal321 773 — 4y

1 answer

Log in to vote
-1
Answered by 4 years ago
Edited 4 years ago

When answering, if your answer does not fully solve the question, it should be written as a comment to the question instead of as an answer.

So first you need at acess player's character "p.CharaterAdded:Connect(function(char)" and after make a for loop .what you did wrong was you wrote "p.ShirtTemplate" it will not acess shirt you need to do "p.Shirt.ShirtTemplate" so it acesses shirt in the local player. :

wait()
p = game.Players.LocalPlayergroupID= 6998516
game.Players.PlayerAdded:Connect(function(p)
    p.CharacterAdded:Connect(function(char)

 if p:IsInGroup(groupID)and p:GetRankInGroup(groupID) >= 252 then

      p.Shirt.ShirtTemplate="http://www.roblox.com/asset/?id=981314839"

  p.Pants.PantsTemplate="http://www.roblox.com/asset/?id=457649168"

end
end)
end)

1
Provide a valid explanation/answer. Telling people to "try" this or that does not help them in future. WideSteal321 773 — 4y
Ad

Answer this question