I’m trying to make a bullet jump like from warframe:
I’ve been trying to do this using a loop and a bodyvelocity of course, but the physics never come out how I want it. I want the bullet jump to abide by gravity like how warframe does it, but It always slows down no matter what direction you’re going I tried applying a rootassemblyvelocity force, didn’t work as intended aswell. If there is any easy ways to do this, like simply using a different force then I would much appreciate that.
In your case I do think that AssemblyLinearVelocity is the way to go.
this is just a script I modified from the toolbox. With some animations it would closely replicate it in my opinon.
-- DOUBLE JUMPING SCRIPT --
-- Put In starterplayer --
local UserInputService = game:GetService("UserInputService")
local localPlayer = game.Players.LocalPlayer
local character
local humanoid
local canDoubleJump = false
local hasDoubleJumped = false
local canJump = true
local oldPowerlocal TIME_BETWEEN_JUMPS = 0.1
local DOUBLE_JUMP_POWER_MULTIPLIER = 5.5
local MOVEMENT_MULTIPLIER = 5.5
function onJumpRequest()
if not character or not humanoid or
humanoid:GetState() == Enum.HumanoidStateType.Dead then
return
end
if canDoubleJump and not hasDoubleJumped then
hasDoubleJumped = true
humanoid.JumpPower = oldPower * DOUBLE_JUMP_POWER_MULTIPLIER
humanoid.Parent.HumanoidRootPart.AssemblyRootPart.AssemblyLinearVelocity = humanoid.Parent.HumanoidRootPart.CFrame.LookVector * humanoid.Parent.HumanoidRootPart.AssemblyMass * (MOVEMENT_MULTIPLIER*1.1)-- movement here
humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
elseif canJump then
canJump = false
humanoid.Parent.HumanoidRootPart.AssemblyRootPart.AssemblyLinearVelocity = humanoid.Parent.HumanoidRootPart.CFrame.LookVector * humanoid.Parent.HumanoidRootPart.AssemblyMass * MOVEMENT_MULTIPLIER-- movement here
end
end
local function characterAdded(newCharacter)
character = newCharacter
humanoid = newCharacter:WaitForChild("Humanoid")
oldPower = humanoid.JumpPower
humanoid.StateChanged:connect(function(old, new)
if new == Enum.HumanoidStateType.Landed then
canJump = true
canDoubleJump = false
hasDoubleJumped = false
humanoid.JumpPower = oldPower
elseif new == Enum.HumanoidStateType.Freefall then
wait(TIME_BETWEEN_JUMPS)
canDoubleJump = true
end
end)
end
if localPlayer.Character then
characterAdded(localPlayer.Character)
end
localPlayer.CharacterAdded:connect(characterAdded)
UserInputService.JumpRequest:connect(onJumpRequest)