I am making a ROBLOX basketball game where you are able to do the “Dropstep” basketball move. I am currently having issues with ONLY the left side of the animation and not the right side, as you can see in the clip below. When the basketball is in my right hand and I do a dropstep, it works as intended, but when the basketball in my left hand the bodygyro makes the animation flip and looks weird.
Here is the code
-- // Init
-- Startup
local Pumpfake = AnimationOperator:GetAnimation(Player,PlayerHandedness.."Pumpfake"..Player_Settings.Jumpshot.Value)
AnimationOperator:ForceStop(Player,.25,PlayerHandedness.."Idle")
Player_Values.Faked.Faking.Value = true
Humanoid.WalkSpeed = 0
TaskService:Gyro(Player,"Get","Pumpfake",Goal,false)
Weld(Character, PlayerHandedness)
-- Previously moving check
if Player_Values.Faked.PrevMoving.Value then
Player_Values.Faked.Value = true
Humanoid.WalkSpeed = 0
if CurrentBall then
if PreviouslyPost and Humanoid.MoveDirection.Magnitude > 0 then
if TaskService:GetDirection(Root,Humanoid,Goal) == "F" then
-- Plays animation
Dropstep:Play(.25)
Dropstep:AdjustSpeed(ShotOperator.DropstepSpeed)
coroutine.wrap(function()
-- Set velocity
TaskService:Velocity(Player,"Set","Dropstep",Goal,{Dir = "F", VelocityMult = ShotOperator.DropstepVelocity})
repeat task.wait() until not Dropstep.IsPlaying
-- Remove gyro
TaskService:Gyro(Player,"Remove","Dropstep")
-- Reset values and play animation
Humanoid.WalkSpeed = 0
Player_Values.Faked.Faking.Value = false
Player_Values.Faked.Value = true
TripleThreat:Play(.25)
end)()
end
else
AnimationOperator:ForceStop(Player,.25,PlayerHandedness.."TripleThreat")
Pumpfake:Play(.25)
Pumpfake:AdjustSpeed(ShotOperator.PumpfakeSpeed)
repeat task.wait() until not Pumpfake.IsPlaying
Player_Values.Faked.Faking.Value = false
Player_Values.Faked.Value = true
TripleThreat:Play(.25)
end
end