So I tried this and it wont work what do I do to fix it?
local MarketplaceService = game:GetService("MarketplaceService")
local Players = game:GetService("Players")
local gamePassID = 0
function onPlayerSpawned(player)
local hasPass = false
local success, message = pcall(function()
hasPass = MarketplaceService:UserOwnsGamePassAsync(player.userId, gamePassID)
end)
if not success then
warn("Error while checking if player has pass: " .. tostring(message))
return
end
if hasPass == true then
local pant = Parent:GetChildren()
for i=1,#pant do
if (pant[i].className == "Pants") then
pant[i].PantsTemplate = "http://www.roblox.com/asset/?id=0"
end
end
local shirt = Parent:GetChildren()
for i=1,#shirt do
if (shirt[i].className == "Shirt") then
shirt[i].ShirtTemplate = "http://www.roblox.com/asset/?id=0"
end
end
end
end
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function()
onPlayerSpawned(player)
end)
end)
Players.PlayerSpawned:Connect(onPlayerSpawned)
P.S you can use the fixed version its not just for me its for everyone!

2 comments
Have you change the Game Pass id and the clothing asset id? Or is this just a example code?
Example.