local bodyPosition = Instance.new("BodyPosition")
        
        bodyPosition.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
        
        local pos = char.HumanoidRootPart.Position
        
        local keysPos = {
            ["W"] = char.HumanoidRootPart.CFrame.LookVector,
            ["A"] = -char.HumanoidRootPart.CFrame.RightVector,
            ["S"] = -char.HumanoidRootPart.CFrame.LookVector,
            ["D"] = char.HumanoidRootPart.CFrame.RightVector
        }
        
        local keysPos2 = {
            ["W"] = "w",
            ["A"] = "a",
            ["S"] = "s",
            ["D"] = "d"
        }
        
        print(dash, keysPos2[dash])
        
        pos += keysPos[dash] * 10
        
        bodyPosition.D /= 2
        
        bodyPosition.Position = pos

	bodyPosition.Parent = char.HumanoidRootPart
        
        wait(0.75)
        
        bodyPosition:Destroy()
        
        char.Humanoid.WalkSpeed = 16

http://gyazo.com/7f865db68b0e39093e913c0c9d53bcdf

This is a script in an event. The bodyposition is a bit laggy most of the time when its about to end. How do I resolve this?

1 comment

0

i don't see the problem in the gyazo