Hi!
I recently started to make a “Donation” game with my friend.I wrote that code to make the players able to but the avatar items showed(The game’s topic is donating avatars, so that’s why we want a mechanic like that).But I don’t know how to get the id’s of them, so can you help me?
Here’s my code:
local Stand = script.Parent.Parent.Parent.Parent
local Prox = Stand.Stand.ProxPart.ProximityPrompt
local Avatar = Stand.Avatar
local Players = game:GetService("Players")
local StandName = Stand.NamePart
local Post = Stand.Post
Prox.Triggered:Connect(function(player)
local desc = Players:GetHumanoidDescriptionFromUserId(player.UserId)
Avatar.Humanoid:ApplyDescription(desc)
Stand.Owner.Value = player.UserId
Stand.Available.Value = false
StandName.BillboardGui.Frame.TextLabel.Text = player.Name.."'s Stand"
Stand.Stand.NamePart.SurfaceGui.TextLabel.Text = player.Name
for i, v in pairs(player.Character.Humanoid:GetAccessories()) do
if v:IsA("Shirt") then
Post.Shirt.ItemID.Value = v.ShirtTemplate
elseif v:IsA("Pants") then
Post.Pants.ItemID.Value = v.PantsTemplate
elseif v:IsA("Accessory") then
--I don't know how to check it :c
end
end
end)