Hi there, back with another question! I can't see the error in this script I wrote, which allows for a player with a game pass to be assigned a GUI.
function assign(property, player)
local GUI = game.ReplicatedStorage:FindFirstChild("Gamepass"..property):GetChildren()
for i = 1,#GUI do
GUI[i]:Clone().Parent = player.PlayerGui.ScreenGui.Avatar:FindFirstChild(property)
end
end
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
wait(0.1)
if game:GetService("GamePassService"):PlayerHasPass(player, 4950898) then
assign("Colors",player)
assign("Faces",player)
end
end)
end)
Any help is appreciated, thanks scripters!

1 comment
It works! Thanks a lot!