Ok so im making a mask somewhat so when the player touches it they get the mask on their head/face but for some reason it isnt even welding properly, i've put anchored == false yet it still welds my character on to the floating mask and some parts of the mask just fall down, it gives me this message "anchored is not a valid member of script" even though im clearly avoiding it by singling out the MeshParts and Parts of the mask. SO AT THE SAME TIME ITS ANCHORING MY CHARACTER TO A PART THATS UNANCHORED?
local Head = script.Parent
local Touch = script.Parent.nose
Touch.Touched:Connect(function(p)
local player = game.Players:GetPlayerFromCharacter(p.Parent)
if player then
if not player.Character:FindFirstChild("sd.bbb :yes:") then
local clone = Head:Clone()
clone.Parent = player.Character
clone:SetPrimaryPartCFrame(player.Character.Head.CFrame)
clone.Name = "sd.bbb :yes:"
local w = Instance.new("Weld")
w.Part0 = clone.Root
w.Part1 = p.Parent.Head
w.Parent = clone.Root
w.C0 = CFrame.new(0,0,1)
for _,v in pairs(clone:GetChildren()) do
if v.ClassName == "MeshPart" or "Part" then
v.Anchored = false
end
end
end
end
end)
