Hi there! I would like to know how to get the height of a player after he traveled a N distance after jumping. This is hard to explain so please say to me if you don’t understand.
Note: the gravity, player walkspeed and player jump power are default. So the walkspeed is 15, the jump power is 50 and the gravity is 196,2.
Humanoid.StateChanged:Connect(function(OldState, NewState)
if NewState == Enum.HumanoidStateType.Freefall then
HeightOfThePlayer = Character:GetPrimaryPartCFrame().Position.Y
end
end)
And you are french ?
If yes you can create a topic in the french categorie because im french too !
You did not understand. This is an estimation of if a player fall. No players have to fall to get the value of the function. It should return y value if I enter x value.
y(t) = y_0 + v_y * t - 1/2 g t²
x(t) = x_0 + v_x * t
Where (x_0, y_0) is the start position, (v_x, v_y) is the start velocity, g is acceleration due to gravity.
I think this is a good start but characters don’t seem to follow typical momentum conservation without extra body movers / constraints so you may need to account for that too.