You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve?
I’m trying to make a script that automatically changes a player’s shirt and pants to a clan group’s uniform. -
What is the issue?
I keep getting this error that I don’t know how to fix.
-
What solutions have you tried so far?
local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
if player:IsInGroup(5641067) then
wait(2)
for _, v in pairs(character:GetChildren()) do
if v.Name == "Shirt" or v.Name == "Pants" then
v:Destroy()
end
end
local Shirt = Instance.new("Shirt", character)
Shirt.Name = "Shirt"
Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=4704222172"
local Pants = Instance.new("Pants", character)
Pants.Name = "Pants"
Pants.PantsTemplate = "http://www.roblox.com/asset/?id=4704226609"
end
end)
end)