Hi, i did a script that when put inside a Character, it's suppose to remove his clothes and put his skin into rock using Material, i am using a R15 Rigs so the body part are MeshPart Here's my script:
local shirt = script.Parent.Shirt
local pants = script.Parent.Pants
wait(2)
shirt.Parent = nil
pants.Parent = nil
local child = script.Parent:GetChildren()
local brick = child.Material
wait(1)
if (child.className == "MeshPart") then
brick = Enum.Material.Concrete
end
Weirdly, it don't seem to work, i am not a professional with script so i can't quite figure out why.

2 comments
Thank you helpful, will use IsA instead but did i messed something else that im unaware?
Um I don’t think so