For some reason, whenever this script fires , Clothing comes back as nil. Everything is where it should be and spelled right..Thanks for any help.
local co = game.Lighting.OutfitStorage.Helmets function WeldHelmet() local PlayerAttire = player.PlayerGui:FindFirstChild("Outfit") local Clothing = co:FindFirstChild(PlayerAttire.OutfitHelmet.Value) local char = player.Character or player.CharacterAdded:wait() local OutfitTop = Clothing:Clone() OutfitTop.Parent = game.Workspace for _,v in pairs(OutfitTop:GetChildren()) do if v.ClassName == "Part" or v.ClassName == "UnionOperation" then v.Anchored = true end end OutfitTop.Parent = workspace for _,v in pairs(OutfitTop:GetChildren()) do if v.ClassName == "Part" or v.ClassName == "UnionOperation" then if v ~= OutfitTop["HelmetCore"] then weld(v, OutfitTop["HelmetCore"]) end end end local OutfitTopWeld = weld(OutfitTop["HelmetCore"], char["FakeHead"], CFrame.new()) for _,v in pairs(OutfitTop:GetChildren()) do if v.ClassName == "Part" or v.ClassName == "UnionOperation" then v.Anchored = false v.CanCollide = false end end end
If you are trying to find the Value
property of the value that wont work. Use this instead:
local Clothing = PlayerAttire:FindFirstChild('OutfitHelmet').Value