-
I want to make a way to add a Moonwalk to a tool when lunging, without it stopping the character mid flight… Here’s a video showing exactly what I want to do..
-
The issue is that when I try to make this happen with the tool, it either doesn’t consistently make the character float up or when the character does float in the air, the tool continues to add more and more to their float when it shouldn’t, or they stop moving for the brief moment at the peak of the height.
-
I’ve tried using BodyVelocity and Tweening to make this work; with issues on each of them.
Tween Script
spawn(function()
local Tool = script.Parent
if Settings.Toggles.MoonWalking then
local Torso = Tool.Parent.Humanoid.Torso
local Direction = Tool.Parent.Humanoid.Torso.CFrame.lookVector
local TweenService = game:GetService("TweenService")
local goal = {}
goal.Velocity = Vector3.new(0,Torso.CFrame.Y + 40,0)
local tweenInfo = TweenInfo.new(Settings.Values.ForceSpeed,Enum.EasingStyle.Elastic)
local tween = TweenService:Create(Torso, tweenInfo, goal)
if not MoonwalkRecharging then
MoonwalkRecharging = true
tween:Play()
end
--tween.Completed:Wait()
print(goal)
MoonwalkRecharging = false
end
end)
Body Velocity Script
spawn(function()
local Tool = script.Parent
if Settings.Toggles.MoonWalking then
local force = Instance.new("BodyVelocity")
force.velocity = Vector3.new(0,10,0) --Tool.Parent.Torso.CFrame.lookVector * 80
force.Parent = Tool.Parent.Torso
wait(.5)
force:Destroy()
end
end)
Thank you for any help you can give me.