Applying gravity on position

Hello. I’m working on a custom movement system and I need to calculate gravity force so that when the player moves he just doesn’t float in the air.

I’m using this code to calculate the next position of the player. and I need to apply gravity force on it.

local newPos = self.AlignPosition.Position + self.MoveVector

Thanks for anyone helping.

go in the setting → remove gravity = 0. Player can’t jump now

but I dont need that… did you even read it

I’m sorrry, I just don’t understand the ‘float’.

I need so it applies the gravity on the new position

maybe that:

–player.position

workspace.gravity -= 1.5

yeah you dont understand what I need

So… if the player is in a certain position the gravity changes so that they float, right?

no never, why would I want that for movement system

but you say ‘I need to apply gravity force on it’?

yes, so when my characters moves and is in air he will fall down

When you change the custom movement the gravity
does not have its effect?

It’s a custom movement system. When players trigger some movement keys it will calculate new positions and move them. It’s not any effect

I’m sorry to have taken you so long but I really don’t know the answer to your question. Good Luck!