This is My code
local Case = script.Case:Clone()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 end) end) --ERROR ON LINE 4
someone Please tell me how to fix this this was in a katana tutorial by RED plys if that helps.
:SetPrimaryPartCFrame
moves PrimaryPart of a model to that CFrame and then moves all the other parts of the model to follow the PrimaryPart, without one this function will break since it won't know which part is the main.
local Case = script.Case:Clone() Case.PrimaryPart = Case. --[[ Some part from the Case model, it can be any part ]] Case:SetPrimaryPartCFrame(Character.HumanoidRootPart.CFrame) Case.Parent = Character