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

Why won't my automatic (group) uniform code work?

Asked by 5 years ago
Edited 5 years ago

I'm trying to make a script that gives a player a certain uniform if they are in my group and has a certain group rank.

(THIS IS AN EXAMPLE CODE SCRIPT USED ON MYSELF)

local GroupID = 4849587

local GroupRank = 255

local Pants = www.roblox.com/asset/?id=3145211201

local Shirt = www.roblox.com/asset/?id=3073597714

game.Players.PlayerAdded:connect(function(Player)

Player.CharacterAdded:connect(function(Character)

if Player:GetRankInGroup(GroupID) >= GroupRank then

Character.Pants.PantsTemplate = Pants

Character.Shirt.ShirtTemplate = Shirt

end

end)

end)

0
Are you getting any errors? whenallthepigsfly 541 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

One possibility is that the player's character may not contain a shirt or pants.

Another is that not all links that lead to a uniform right away, if you ever run a game and changed your clothing ingame, you may notice that the asset you copied is not the same as the one you pasted on the clothing template. Try using InsertService:LoadAsset()

Ad

Answer this question