New: Nitro Boost our Discord server and receive full donation perks here on the website! Join the Scripting Helpers Discord Server to learn more! You can also Support on Patreon as always.
Still have questions? Join our Discord server and get real time help.
0

# Any ways of equipping assets unto Player?

Serpawh -4
3 months ago

I am wondering if there is any possibility of me making a character wear some shirt/pant. I know this might be harder than it looks, but if someone could help me I'd appreciate it a lot.

So far my scripting is limited to Humanoid, and everything beginner.

0
So you want all characters to wear same shirt and pants? memguy 61 — 3mo
0
Yes. Please. Serpawh -4 — 3mo
0
Do you want every character to be identical or only wear the same clothing? alphawolvess 1699 — 3mo

1
Answered by 3 months ago
game.Players.PlayerAdded:Connect(function(plr)

local char = plr.Character
local shirt = Instance.new('Shirt')
local pants = Instance.new('Pants')

shirtID = -- Put your shirt ID here
pantsID = -- Put your pants ID here

shirt.ShirtTemplate = 'rblxasset://'..shirtID
pants.PantsTemplate = 'rblxasset://'..pantsID

end


If this doesn't work, just add an R15/R6 rig, add the shirt/pants to it, then name the model 'StarterCharacter' then put it in game.StarterPlayer. Hope this helps! <3

1
Answered by 3 months ago

There are several ways to accomplish what you want, such as the Answer by Cvllapse. However, a newer method has been released not too long ago using HumanoidDescription. Bellow is the script that should accomplish your task, of course, don't forget to change the shirt/pants to your desired ID.

game:GetService("Players").PlayerAdded:Connect(function(Plr)
local Hum = Char:WaitForChild("Humanoid")
local HumDescClone = Hum:GetAppliedDescription() -- Gets current character assets

HumDescClone.Shirt = "2976901625"
HumDescClone.Pants = "2968835127"

repeat wait() until Char.Parent == game.Workspace -- If the char is not in Workspace, you'll recieved a DataModel error for the below line!

Char.Humanoid:ApplyDescription(HumDescClone)
end)
end)

0
You can also use the above to change bodyparts, and add hats, etc alphawolvess 1699 — 3mo