EmeraldIT

Untitled

Jul 7th, 2025 (edited)
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. local velocityToAdd = platformVelocity
  2.  
  3. local humanoid = character:FindFirstChildOfClass("Humanoid")
  4. local isGrounded = humanoid and humanoid.FloorMaterial ~= Enum.Material.Air
  5.  
  6. if not isGrounded then
  7. -- Remove Y component while jumping/falling
  8. velocityToAdd = Vector3.new(platformVelocity.X, 0, platformVelocity.Z)
  9. end
  10.  
  11. hrp.AssemblyLinearVelocity += velocityToAdd
Advertisement
Add Comment
Please, Sign In to add comment