Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local velocityToAdd = platformVelocity
- local humanoid = character:FindFirstChildOfClass("Humanoid")
- local isGrounded = humanoid and humanoid.FloorMaterial ~= Enum.Material.Air
- if not isGrounded then
- -- Remove Y component while jumping/falling
- velocityToAdd = Vector3.new(platformVelocity.X, 0, platformVelocity.Z)
- end
- hrp.AssemblyLinearVelocity += velocityToAdd
Advertisement
Add Comment
Please, Sign In to add comment