I’m trying to make a kart jump via bodyvelocity. But bodyvelocity puts all other velocities to a halt. Is there a way to prevent this or is there a bodyvelocity alternative that does not put other velocities to a halt?
In this video, when the kart "jumps, " it loses all of its other velocities.
Code:
JumpRemote.OnServerEvent:Connect(function(plr) -- You can edit what happens when this fires if you want
if not plr.PlayerGui:FindFirstChild("A-Chassis Interface") then return end --Check if player is in the vechicle
local Vehicle = plr.PlayerGui:FindFirstChild("A-Chassis Interface").Car.Value
if not Vehicle.DriveSeat:FindFirstChildOfClass("Weld") then return end
--Make parts massless
for i, instance:Instance in pairs(Vehicle:GetDescendants()) do
if instance:IsA("BasePart") or instance:IsA("MeshPart") then
if not instance.Massless then
instance.Massless = true
task.delay(1, function()
instance.Massless = false
end)
end
if instance.Parent.Name == "Wheels" then
--Apply BodyVelocity
local JumpVelocity = Instance.new("BodyVelocity") -- didn't use second arg bc a roblos staff proved that you shouldn't
JumpVelocity.Velocity = Vector3.new(0, JumpForce, 0)
JumpVelocity.Parent = instance
Debris:AddItem(JumpVelocity, 0.1) -- No more velocity
end
end
end
end)