i’ve tried this, but it results in a buggy mess once the target hits the ground:
here’s the entire part of the script that handles the changing of rotation:
local past = Vector3.new()
local current = targetChar.HumanoidRootPart.Position
local isStill = false
local getup = false
local con
con = game:GetService('RunService').Heartbeat:Connect(function()
targetChar.HumanoidRootPart.CFrame = CFrame.new(targetChar.HumanoidRootPart.Position, -targetChar.HumanoidRootPart.Velocity + targetChar.HumanoidRootPart.Position)
current = targetChar.HumanoidRootPart.Position
if (current - past).Magnitude < 0.1 then
if targetChar:FindFirstChild('Stun') and target.FloorMaterial ~= Enum.Material.Air then
getup = true
con:Disconnect()
isStill = true
end
else
isStill = false
end
past= targetChar.HumanoidRootPart.Position
end)
local curpos = part.Position -- our current position
part.Changed:Connect(function() -- a changed function so it updates everytime
local oldpos = oldpos-part.Velocity -- we calculate the old position of our part
part.CFrame = CFrame.new(curpos,oldpos) -- we rotate our part though I am a bit skeptical this may break everything
curpos = part.Position -- we re-set our current position
end)