Alright, So I'm extremely new to scripting, Learning obviously. I found a tutorial on how script a NPC / Model onto someone, but every time I go to try get clothing on it says,
touch is not a valid member of part
Here is the code
script.Parent.touch:connect(function(hit)
if (hit.Parent:FindFirstChild("Humanoid"))then
--local plr = game.players:FindFirstChild(hit.Parent.Name)
local plrPants = hit.Parent:FindFirstChild("Pants")
if (plrPants) then
plrPants:remove()
end
local plrShirt = hit.Parent:FindFirstChild("Shirt")
if (plrShirt) then
plrShirt:remove()
end
local newClothingPants =script.Parent.Parent.NPC.Pants:Clone()
local newClothingShirt =script.Parent.Parent.NPC.Shirt:Clone()
newClothingPants.Parent = hit.Parent
newClothingShirt.Parent = hit.Parent
end
end)
Any help would be appreciated

1 comment
Lua is case sensitive and unforgiving to spelling mistakes as well, use script.Parent.Touched:Connect(function(hit)) instead on line 1