You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear! I want to make a custom jump script with a different animation
-
What is the issue? Include screenshots / videos if possible! I need to stop the falling animation when the player touches the ground but I dont know how to do that. Humanoid states dont seem to work with a custom jump(i apply force through a script)
-
What solutions have you tried so far? Did you look for solutions on the Developer Hub? Now, I know, it seems like there are plenty of similar topics, but I tried many of solutions in them, and noothing worked. I think thats because they are relying on the regular jump, and I have a custom one.
I want the player to play an animation that consists of 2 parts:
- Charge : before the animation event, the player just stands in place
- Jump : after the animation event, an upward force is applied to the player to make him jump
I made the jump part super long to cover the time spent in air, but I need to stop the animation as soon as the player touches the ground.
The animation :
The server script:
game.ReplicatedStorage.Remotes.stillJump.OnServerEvent:Connect(function(player)
local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://126307006062723"
local track = player.Character.Humanoid:LoadAnimation(animation)
track:Play()
track:GetMarkerReachedSignal("jump"):Connect(function()
print("reached")
game.ReplicatedStorage.Remotes.stillJump:FireClient(player)
end)
end)
The local script :
game.ReplicatedStorage.Remotes.stillJump.OnClientEvent:Connect(function()
game.Players.LocalPlayer.Character.HumanoidRootPart:ApplyImpulse(Vector3.new(0, 700, 0))
end)