How i can always detect when player moving or flying (when apply force(bodyvelocity) on him) direction and do raycast for check when player touch the ground like in this video? :
Please help if you can and sorry for my english (i use translator)
How i can always detect when player moving or flying (when apply force(bodyvelocity) on him) direction and do raycast for check when player touch the ground like in this video? :
Please help if you can and sorry for my english (i use translator)
Use HumanoidRootPart.Velocity for that. It updates correctly and does tell you movement direction. For movement respected to another Vector I think its like VectorToObjectSpace? I don’t remember.
I figured out how to do this, thank you very much!
local part = Instance.new("Part",workspace)
coroutine.wrap(function()
while true do
if breaker ~= true then
print(who:FindFirstChild("HumanoidRootPart").Position + who:FindFirstChild("HumanoidRootPart").Velocity)
part.Position = who:FindFirstChild("HumanoidRootPart").Position + who:FindFirstChild("HumanoidRootPart").Velocity
part.CFrame = CFrame.lookAt(who:FindFirstChild("HumanoidRootPart").Position,who:FindFirstChild("HumanoidRootPart").Position + who:FindFirstChild("HumanoidRootPart").Velocity)
part.Size = Vector3.new(1,1,5)
part.Anchored = true
part.CanCollide = false
task.wait(0.1)
else
break
end
end
end)()
No probs glad your solution is done!
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.