Hello! I am trying to make a script so that if a player chats “!uniform” that they get the uniform if their rank is above a certain role in a group. I got the whole group thing working, now its just that the actual giving the clothing to the player is not working and I keep getting an error.
Error:
[19:36:11.749 - Image "https://www.roblox.com/catalog/5121943153/Uniform-Pants" failed to load in "Workspace.Federal_Enforcer107.Humanoid.Clothes": Request failed](rbxopenprop://1%2E1850268/Clothes)
This is my code:
game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(msg)
if msg == “!uniform” then
if player:GetRankInGroup(4978658) >= 4 then
local foundShirt = player.Character:FindFirstChild(“Shirt”) – Tries to find Shirt
player.Character.Shirt.ShirtTemplate = "https://www.roblox.com/catalog/5121938459/LR-Uniform"
--local newShirt = Instance.new("Shirt",player.Character)
--newShirt.Name = "Shirt"
local foundPants = player.Character:FindFirstChild("Pants") -- Tries to find Pants
player.Character.Pants.PantsTemplate = "https://www.roblox.com/catalog/5121943153/Uniform-Pants"
--local newPants = Instance.new("Pants",player.Character)
--newPants.Name = "Pants"
--player.Character.Shirt.ShirtTemplate = 5121938459
--player.Character.Pants.PantsTemplate = 5121943153
else
end
end
end)
end)
Thanks for the help!