***`game.Players.PlayerAdded:Connect(function(Player) Player.CharacterAdded:Connect(function(Character) local Case = script.Case:Clone() Case:SetPrimaryPartCFrame(Character.HumanoidRootPart) 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.Katana:Clone() Sword:SetPrimaryPartCFrame(Case.Case.CFrame * CFrame.new(0,-125,2.65)) Sword.Parent = Character local weld2 = Instance.new("ManualWeld") weld2.Part0 = Sword.PrimaryPart weld2.Part1 = Character.PrimaryPart weld2.C0 = weld2.Part0.CFrame:ToObjectSpace(weld2.Part1.CFrame) weld2.Parent = weld2.Part0end) end)`***
This is my code and when i hit play and this freaking error ...
Unable to cast Instance to CoordinateFrame
what should i do :_)
The error means there is an instance where there should be a CFRAME. Please check your code thoroughly before posting an issue. There is an error with the cases primarypartcframe
Case:SetPrimaryPartCFrame(Character.HumanoidRootPart.CFrame)