Case is not a valid member of Model "tumtindy.Case" is my error,
I am pretty new to scripting, so this might be an obvious mistake but for me it is not. I am trying to make my model called "Sword" be visible inside of my "Case" which is attached to the HumanoidRootPart. (This is for R6)
game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(Character) local Case = script.Case:Clone() Case:SetPrimaryPartCFrame(Character.HumanoidRootPart.CFrame) Case.Parent = Character local weld = Instance.new("ManualWeld") weld.Part0 = Case.PrimaryPart weld.Part1 = Character.PrimaryPart weld.C0 = weld.Part0.CFrame:ToObjectSpace(weld.Part1.CFrame) weld.Parent = weld.Part0 local Sword = script.Sword:Clone() Sword:SetPrimaryPartCFrame(Case.Case.CFrame * CFrame.new(0,0,-4)) Sword.Parent = Character local weld2 = Instance.new("ManualWeld") weld2.Part0 = Sword.PrimaryPart weld2.Part1 = Case.PrimaryPart weld2.C0 = weld2.Part0.CFrame:ToObjectSpace(weld2.Part1.CFrame) weld2.Parent = weld2.Part0 end) end)
Case is not a valid member of Model is basically an error that describes to you that It is not a member, of model. Or Inside of it.
You require the exact path to the object unless the object is removed. A reason the object could be removed is NoCollide off, Anchored off, not welded to anything (for first 2), deleted by script, or never existed.
The problem is very simple, try this one. Well I'm not sure cause I don't know where you really want to place the case or which line break cause you didn't include that.
game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(Character) local Case = script.Case:Clone() Case:SetPrimaryPartCFrame(Character.HumanoidRootPart.CFrame) Case.Parent = Character.HumanoidRootPart local weld = Instance.new("ManualWeld") weld.Part0 = Case.PrimaryPart weld.Part1 = Character.PrimaryPart weld.C0 = weld.Part0.CFrame:ToObjectSpace(weld.Part1.CFrame) weld.Parent = weld.Part0 local Sword = script.Sword:Clone() Sword:SetPrimaryPartCFrame(Case.Case.CFrame * CFrame.new(0,0,-4)) Sword.Parent = Character local weld2 = Instance.new("ManualWeld") weld2.Part0 = Sword.PrimaryPart weld2.Part1 = Case.PrimaryPart weld2.C0 = weld2.Part0.CFrame:ToObjectSpace(weld2.Part1.CFrame) weld2.Parent = weld2.Part0 end) end)