Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Change Clothes Script (On Touch) Not Working?

Asked by 7 years ago

--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

Log in to vote
0
Answered by
iDemum 0
7 years ago

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. )

Ad

Answer this question