Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Change Clothes Script (On Touch) Not Working?

--theRal

worker = false part = script.Parent

function onTouch(hit) local human = hit.Parent:FindFirstChild("Humanoid") if (human ~= nil) and (worker == false) then print ("Success") worker = true wait(.1) local pant = hit.Parent:GetChildren() for i=1,#pant do if (pant[i].className == "Pants") then pant[i].PantsTemplate = "http://www.roblox.com/asset/?id=190791972" end end local shirt = hit.Parent:GetChildren() for i=1,#shirt do if (shirt[i].className == "Shirt") then shirt[i].ShirtTemplate = "http://www.roblox.com/asset/?id=190791942" wait(1) worker = false end end end end

script.Parent.Touched:connect(onTouch)

Hi, I used this script and it doesn't work, just makes the character nude. Help?

1 answer

Pretty sure you have to remove one number for the assets to load. So The first ID should be 190791971 and the second should be 190791941. ( And it is I checked on ROBLOX. )

This discussion is preserved as it was. New answers, comments, and votes are closed.