Hi, i working on my bow system, but i got this error
And when i added vector3 to mouse pos script the part face won’t face to mouse direction
Here server script
local part; do
part = Instance.new("Part")
part.Anchored = false
local mesh = script.Mesh:Clone()
mesh.Parent = part
part.Color = Color3.new(0.152941, 0.407843, 1)
part.Material = Enum.Material.Neon
part.CanCollide = false
part.Parent = workspace
part.CFrame = CFrame.new(weaponsheat.CFrame.p,Mouse)
part.Size = Vector3.new(0.3,0.3,5)
end
local bv2 = Instance.new("BodyVelocity")
bv2.Velocity = part.CFrame.LookVector * 25
bv2.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
bv2.Parent = part
canDamage = true
Here the local script
local function onInputBegan(input, gameProcessed)
if not gameProcessed then
if input.KeyCode == Enum.KeyCode.E then
EquipSword:FireServer()
elseif input.UserInputType == Enum.UserInputType.MouseButton1 then
local mousepos = mouse.Hit.Position
print(mouse.Hit.p)
Attack:FireServer(mouse.Hit.p)
end
end
end
Here when i added vector3.new