i just idk how to fix it. Any help?
print("spawn knife")
local knife = game.ReplicatedStorage.Knife:Clone()
local vel = Instance.new("BodyVelocity",knife.PrimaryPart)
vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
vel.Velocity = (mouse.Hit.Position - knife.PrimaryPart.Position).Unit * 50
if workspace.TS.Value == true then
for i,v in pairs(knife:GetChildren()) do
if v:IsA("BasePart") then
v.CanCollide = true
v.Anchored = true
end
end
end
knife.Parent = workspace
knife.PrimaryPart.CFrame = char.HumanoidRootPart.CFrame * CFrame.new(0,0,-3)
knife.PrimaryPart.CFrame = CFrame.new(knife.PrimaryPart.Position, mouse.Hit.Position) * CFrame.Angles(math.rad(-90),0,0)