I'm trying to make a dodge which suspends you in the air while also moving you in one direction, i have achieved that by using tweenservice and CFrame, the only problem is whenever I run this code it turns my player in a fixed rotation, right now my player moves right but my character is looking forward. this is my code
game.ReplicatedStorage.Dodge.OnServerEvent:Connect(function(player)
local tweenService = game:GetService("TweenService")
local part = player.Character.HumanoidRootPart
game.Workspace.DodgeCircle.Transparency = 0
player.Character.HumanoidRootPart.Anchored = true
local goal = {}
goal.CFrame = CFrame.new(player.Character.HumanoidRootPart.Position + Vector3.new(25,0,0))
local tweenInfo = TweenInfo.new(.2)
local tween = tweenService:Create(part, tweenInfo, goal)
tween:Play()
wait(.2)
game.Workspace.DodgeCircle.Transparency = 1
player.Character.HumanoidRootPart.Anchored = false
end)

1 comment
When using CFrame.Angles, make sure that the Angle you put in is in radians. You can use math.rad(90) to convert a number in degrees into radians!