The invalid link does not work
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.
Know that you want to do freefall
A falling player from a high place enables you to control the player
While in the air and upon reaching the ground, you do what you want to do
What is important to you is the control if you know that the player is in the air or on the ground
I have a landing parachute form if I find time I will send you a video
Alright, I will try that. Thank You.
Landing parachute
This is what I am talking about. If it is far from what you want to do then I apologize for wasting your time
If the player jumps and is in the air
I calculate the distance between the player and the falling point
Do whatever I want while the player is in the air
The player can use Parachute
If the player reaches the ground and is not using a Parachute, he will die
Change what you want to change and do what you want, it is important to know how the program works
This code when placed inside a Script in ServerScriptService
game:GetService('Players').PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
local root = character:WaitForChild("HumanoidRootPart")
local humanoid = character:WaitForChild("Humanoid")
local animation = script:WaitForChild("Animation")
local animate = character:WaitForChild("Animate")
local EndJump = 50 --Put the distance you want
local FallDeath = false
local heartbeat = nil
local ParachuteTrue = nil
-- Create the animation just the way you want it
local function playAnimationFromServer(MyCharacter, MyAnimation)
local MyHumanoid = MyCharacter:FindFirstChildOfClass("Humanoid")
if MyHumanoid then
local MyAnimator = MyHumanoid:FindFirstChildOfClass("Animator")
if MyAnimator then
local MyTrack = MyAnimator:LoadAnimation(MyAnimation)
MyTrack:Play()
return MyTrack
end
end
end
local function onFallingDeath()
local Base = root.CFrame * Vector3.new(0,-10,0)
local ray = Ray.new(root.CFrame.p, (Base - root.CFrame.p).unit * 300)
local part, position = workspace:FindPartOnRay(ray, character, false, true)
local distance = (root.CFrame.p - position).magnitude
print(distance)
local MyParachute = character:FindFirstChild("Parachute")
if MyParachute == nil then
ParachuteTrue = nil
end
if MyParachute ~= nil then
ParachuteTrue = MyParachute
local MyBodyVelocity = root:FindFirstChild("BodyVelocity")
for _, playingTracks in pairs(humanoid:GetPlayingAnimationTracks()) do
playingTracks:Stop()
end
if MyBodyVelocity then
MyBodyVelocity:Destroy()
end
animate.Disabled = false
end
if distance > EndJump and FallDeath == false and ParachuteTrue == nil then
FallDeath = true
animate.Disabled = true
-- Animation playback
playAnimationFromServer(character, animation)
-- It makes the downward movement slow
local bodyvelocity = Instance.new("BodyVelocity")
bodyvelocity.maxForce = Vector3.new(0, 99999, 0)
bodyvelocity.P = 1250
bodyvelocity.velocity = Vector3.new(0,-10,0)
bodyvelocity.Parent = root
end
end
humanoid.StateChanged:Connect(function(oldState, newState)
if newState ~= Enum.HumanoidStateType.Freefall then
if FallDeath == true then
FallDeath = false
for _, playingTracks in pairs(humanoid:GetPlayingAnimationTracks()) do
playingTracks:Stop()
end
local MyBodyVelocity = root:FindFirstChild("BodyVelocity")
if MyBodyVelocity then
MyBodyVelocity:Destroy()
end
animate.Disabled = false
humanoid:UnequipTools()
if ParachuteTrue == nil then
humanoid.Health = 0
end
end
end
end)
humanoid.FreeFalling:connect(function(onFreeFall)
if onFreeFall == true then
heartbeat = game:GetService("RunService").Heartbeat:Connect(onFallingDeath)
end
if onFreeFall == false then
heartbeat:Disconnect()
heartbeat = nil
end
end)
end)
end)
If it doesn’t work well tell me about the problem
I wish you good luck in what you do
Also, what do you mean by you did not change the default animation. If I remeber correctly, in the last reply you said you changed the default fall animation to the free fall animation. One more thing, if I use a property signal changed function, would I check if the Movement Direction is 0,0,0. If it is then I would play the free fall animation, if not then the diving animation, correct?
Thank you for the help. Unfortunatly this is not what I am looking for, but I believe this can be a use for my project in the future. Thanks!
Exactly (on the movedir question). On the animation question, I don’t change the defaults, I just use ‘Action’ priority animations which take priority over the defaults. I did not have to change them.
Ah, alright. Thank You so much for your help. I have successfully achieved what I have been looking for: https://gyazo.com/3da7dec699731cfcc7de179def2a81b0
Looks great. I like that animation.
Thanks! I still need the diving animation because my recent animator took my robux and dipped me and the animation basically looks like a statue with no movement. Also keep up the great work on your game! Is really good.
Hey there, this isnt very related fo the topic I asked but do you know how I can make the character tilt only on the y axis according to their camera’s movement? Is basically shift lock but on Y axis only.
Try to explain more
I do not speak English
Write separate sentences, translation will be better
He means how can you make the player rotate around the y axis (as a pole dancer in a sense) while also being always facing away from the camera. I told him he can use the cross difference of the two vectors but oh “that ways too complex” lol
What does lol mean? I do not know its meaning
Hey Highness, I have a question. I see you added a similar skydivibg system like mine and im wondering how you did the smooth transection from the freefalling to the diving.
it is english slang for “laughing out loud” it is commonly used to make fun of somebody