I’m working on a skill that fires 3 parts (saws) in front of the character in 3 different directions (spaced by 20° each). However, I can’t get the blades to move with the Front face facing towards the target position. Basically they should move along the thin face
Proof: https://gyazo.com/183e69233cfccf3f09101e75effe5d55
This is where the front face is, which is also the correct direction:
How can I rotate them in the correct direction?
`Code:
return function(var)
local startCF = var[2] --HumanoidRootPart CFrame
local duration = var[3] --0.75s
local speed = var[4] --25
local target = var[5] --mouse position
local targetXZ = Vector3.new(target.Position.X,0,target.Position.Z)
for i = 0,2 do
local airBlade = airSaws:Clone()
airBlade.CFrame = startCF
local originXZ = Vector3.new(airBlade.CFrame.Position.X,0,airBlade.CFrame.Position.Z)
airBlade.CFrame = CFrame.new(originXZ,targetXZ) + Vector3.new(0,startCF.Position.Y,0)
airBlade.CFrame = airBlade.CFrame * CFrame.Angles(math.rad(90),0, math.rad(70 + (i * 20)))
airBlade.Parent = workspace.Bullets
airBlade:WaitForChild("Particles"):WaitForChild("AirSaw"):Emit(2)
local start = tick()
local lastRock = tick()
local connection
connection = Service.RunS.Heartbeat:Connect(function(delta)
if tick() - start > duration then
Service.Debris:AddItem(airBlade,3.5)
for _,particle in pairs(airBlade.Particles:GetChildren()) do
particle.Enabled = false
end
connection:Disconnect()
return
end
airBlade.CFrame = airBlade.CFrame * CFrame.new(-speed * delta,0,0)
end)
end
end
File:
airblade_test.rbxl (44.3 KB)