if characterAssets["Shirt"] then if not shirt then shirt = Instance.new("Shirt", character) end shirt.ShirtTemplate = "rbxassetid://" .. characterAssets["Shirt"] end
Here are a few options for a good review, depending on what kind of script it is (e.g., a simple command script, a GUI hub, or an admin command addon). avatar changer script roblox
LocalPlayer.CharacterAdded:Connect(changeAvatar) if characterAssets["Shirt"] then if not shirt then shirt
For a more advanced system, check out the Catalog Avatar Creator for inspiration on how to let players try on items. a simple command script