I am building a new FPS game on roblox, and I need to add army clothing to a specific group. But I don't know how to do that. I need to script a Stater Character, but I cant find anything in the wiki to explain how to do this particular action. I really need help with this. Please someone help me!
I compiled this code just for you.
By using IsInGroup this script checks if you are in the group, if the player is; then you change into a certain outfit.
local groupId = 0 local shirtId = 0 local pantsId = 0 local skin = "Brick yellow"--BrickColor for skin local teamColor = "Bright red"--Your group's team color game.Workspace.ChildAdded:connect(function(plr) if plr:IsInGroup(groupId) then local name = plr.Name local playerinplayers = game.Players:FindFirstChild(plr.Name) playerinplayers.CanLoadCharacterAppearance = false local bodycolors = Instance.new("BodyColors", plr) bodycolors.RightArmColor = BrickColor.new(skin) bodycolors.LeftArmColor = BrickColor.new(skin) bodycolors.HeadColor = BrickColor.new(skin) bodycolors.RightLegColor = BrickColor.new(skin) bodycolors.LeftLegColor = BrickColor.new(skin) bodycolors.TorsoColor = BrickColor.new(skin) local shirt = Instance.new("Shirt") shirt.Parent = plr shirt.ShirtTemplate = "http://www.roblox.com/asset/?id="..shirtId - 1 local pants = Instance.new("Pants") pants.Parent = plr pants.ShirtTemplate = "http://www.roblox.com/asset/?id="..pantsId - 1 playerinplayers.TeamColor = BrickColor.new(teamColor) end end)
http://wiki.roblox.com/index.php?title=API:Class/Player/IsInGroup