Hello,
I’m trying to make a dash system, I want to make dashes work without ShiftLock, in the direction the camera is turned. For this I use a body gyro, and give it the camera coordinates. But I don’t know how to remove the Y coordinate.
I tried to make gyro.MaxTorque = Vector3.new(999999,0,999999), but it stopped working after that. To be honest, I’m not very familiar with all the old Roblox components, and most of them I just haven’t tried to do.
So when I look up or down, my character turns completely in the direction of the camera, and I don’t need that - I would like to know how I could fix this. (( I tried to find a solution on the forum but couldn’t find it ))
local gyro = Instance.new("BodyGyro", HRP)
gyro.P = 999999
gyro.MaxTorque = Vector3.new(999999,999999,999999)
local detecting
detecting = RS.Heartbeat:Connect(function()
if not LV.Parent then
PowerNumber:Destroy()
Character:SetAttribute("Dashing",false)
gyro:Destroy()
detecting:Disconnect()
else
gyro.CFrame = Camera.CFrame
LV.VectorVelocity = -HRP.CFrame.RightVector * PowerNumber.Value
end
end)