Very confused on why I'm getting this error, I'm trying to make a tool make a part from replicatedstorage clone to workspace when clicked on with it activated and then its cframe will be constantly moving forward in the spot your mouse clicks on, but for some reason I keep getting that error. Heres the script:
local Tool = script.Parent
local Cooldown = false
local CDTime = 65
Tool.RemoteEvent.OnServerEvent:Connect(function(Player, Mouse)
if Cooldown then return end
spawn(function()
Cooldown = true
wait(CDTime)
Cooldown = false
end)
local Mugetsu = game.ReplicatedStorage.Abilities.Shinigami.Parts.Mugetsu:Clone()
Mugetsu.Size = Vector3.new(1.427, 44.539, 1.55)
Mugetsu.Parent = game.Workspace
local pos = Player.Character.Head.Position + CFrame.new(Player.Character.Head.Position,Mouse.p).lookVector * 1
Mugetsu.CFrame = CFrame.new(pos.Mouse.p)
Mugetsu.CanCollide = false
Mugetsu.Anchored = false
Mugetsu:SetNetworkOwner(Player)
local BodyVelocity = Instance.new("BodyVelocity",Mugetsu)
BodyVelocity.Velocity = Mouse.lookVector * 200
BodyVelocity.MaxForce = Vector3.new(1e8,1e8,1e8)
game.Debris:AddItem(Mugetsu,3.5)
Mugetsu.Touched:Connect(function(hit)
if hit and not hit.Parent:FindFirstChild("Humanoid") and hit.CanCollide == true then
Mugetsu:Destroy()
end
end)
Mugetsu.Touched:Connect(function(hit)
if hit.Parent == Player.Character then return end
if hit and hit.Parent:FindFirstChild("Humanoid") then
local EnemyHum = hit.Parent:FindFirstChild("Humanoid")
EnemyHum:TakeDamage(100)
Mugetsu:Destroy()
end
end)
end)
Please help

2 comments
On line 19 you set "pos" to a Vector3 Value. And on line 20 you do "pos.Mouse". Mouse is not a property or something of a Vector3 Value. I honestly don't see what's so confusing
Okay