Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why isn't BodyPosition Being Consistent?

Asked by 4 years ago
Edited 4 years ago

So I am trying to create sidestep animations for whenever characters double tap 'A' (left) and 'D' (right). I am using BodyPosition to move the player's humanoid root part as the animation plays so that they actually move; however, it just isn't very consistent. Sometimes it will move me approximately 10 studs (as it should), where other times it will hardly move my character at all. I'm very new to BodyPositions (and not even sure if I should be using something different anyway). Here is the relevant portion of my code. Thanks in advance to anyone who knows what's up.

local start_pos = character.HumanoidRootPart.Position
            animation:Play() -- This is .4 seconds long by the way
            local force = Instance.new("BodyPosition")
            force.Name = "SideStepForce"
            force.MaxForce = Vector3.new(8000, 8000, 8000)
            force.Position = start_pos + character.HumanoidRootPart.CFrame.RightVector * -60
            force.Parent = character.HumanoidRootPart
0
that is basically because of friction. Elixcore 1337 — 4y
0
But I'm on the same surface though. Shouldn't friction act the same regardless? corncob567 275 — 4y
0
I’m sure you can’t be doing maths like that with a CFrame value SmartNode 383 — 4y

Answer this question