Skydiving System HOW TO

You just set the walk speed. It automatically controls X and Z, if the player ‘walks’ in the air while in the freefall state, he will move in a direction at the walk speed. So by default they can control their direction in fall, it just doesn’t move much at the default 16 walk speed.

Ahh I see, I really really like really enjoy your game. Is simple and really nice. I really like the glider system and I am trying to achieve making that, but without the glider ofc. So may I ask how you slow the player down during freefalling then speed the fall back up when they are “walking” in the air?

idk animations arent dynamic :rofl:

Thanks. I don’t speed up the fall when they are moving, just the lateral (walk) speed, the freefall remains constant, although I randomize the fall a bit so players may not fall at the exact same speeds, but they maintain their fall speed until they splat or otherwise put out their glider. I randomize the speed to add some variety and because its pretty cool to fall with a friend and be able to see them fall way from you slowly and skirt about quickly laterally as they move.

Ah I see, so is is just a matter of using the skydiving animation and playing around with the walk speed?

Yes, and adding the vector force in the up direction to make them fall slower (and deleting that when they are done falling). This is kind of like the wind resistance, pushing them up so they reach a constant terminal velocity and not keep accelerating to infinite speed.

6 Likes

Alright, I understand now. Thank you so much for helping me out!

I just wanted to clarify something, I reviewed my code and I actually used BodyVelocity vs VectorForce. VectorForce could add a little complication so I wanted to clarify that.

BodyVelocity should simplify things since you just set the velocity you want and it will maintain it.

I think they want devs to get away from that and use vectorforce, maybe I’ll convert mine at some point.

Good luck!

Ah I see, if I were to use BodyVelocity, what would I set the x,y,z velocity values to? And what is the best Max Force.

1 Like

That depends on how fast you want to fall, so you’d use (0, -fallvelocity, 0)

This YT video for setting up a simple slow fall should really help you see how it works.

1 Like

May I ask something? How did you handle the animation? I was thinking of making a free fall animation and changing the player’s idle animation to the free fall animation. That way when the player is not moving around, it plays the free fall animation. I will also be making a diving animation and put that into the walk animation so that when the character moves, it plays the animation. Do you think this is a good approach?

Yes, just make your animations Actions so they override the default stuff and you don’t have to worry about changing the defaults.

This is what I have right now and is really bad. :confused:

Why isnt it changing the fall anim to the second anim even though I stopped moving? 
local plr = game.Players.LocalPlayer

chr = plr.Character or plr.CharacterAdded:Wait()

local RunService = game:GetService("RunService")

local function updateSkydiveAnim()
	if chr then
		if chr.Humanoid.MoveDirection.Magnitude > 0 then
			chr.Animate.fall.FallAnim.AnimationId = "rbxassetid://6214558611"
		end

		if chr.Humanoid.MoveDirection.Magnitude <= 0 then
			chr.Animate.fall.FallAnim.AnimationId = "rbxassetid://6214532059"
		end
	end
end

-- Update the effect on every single frame.
RunService.RenderStepped:Connect(updateSkydiveAnim)

https://gyazo.com/4b876977b23036cd6007fec18e9b4e8a

I don’t know if this is close to the thing you want to do

1 Like

Yes, I alredy have that, but what I am trying to achieve is wheb the character moves in a direction while falling, I want it to player a diving animation. But if they dont move around and just stay still, then I want it to be a free fall. As you can see, I made a code above and the free fall works but when i move in a direction it plays the animation but then when I still stay, it still plays the diving animation. You can take a look at the gyoza gif.

The invalid link does not work

https://gyazo.com/4b876977b23036cd6007fec18e9b4e8a

What I understood after translation is that you want to do the same thing

I know you don’t want to kill the player

Just remove humanoid.Health = 0

For the sake of movement, you have to remove this

humanoid.WalkSpeed = 0

Canceling a player’s death can not change anything in the course of the program

You can do whatever you want with the player while in the air or upon reaching the ground

The idea is simple

Depend on the distance between the player and the point of fall

Determine the distance to do whatever you want from the animation or something else

I think you missunderstood me, I am not trying to make fall damage.

I don’t know about your code, but I didn’t use an update loop like you do with renderstepped, I trigger the dive animations based on the movedirection like:

character.Humanoid:GetPropertyChangedSignal(“MoveDirection”):Connect(function()

I use that to play and stop my ‘action’ animations which override the default animations, I did not change any default animations.

1 Like