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

Position is not a valid member of BodyVelocity HELP??!

Asked by 3 years ago
Edited by Rare_tendo 3 years ago

the script im using has an error and i dont know how to fix it :(

the script:

local remote = script.Parent
local firstmvDb = false
remote.OnServerEvent:Connect(function(Player,Action)

    local char = Player.Character
    local hum = char:WaitForChild("Humanoid")
    local humrp = char:WaitForChild("HumanoidRootPart")


    local Anims = script:WaitForChild("Anims")
    local Sounds = script:WaitForChild("Sounds")
    local FX = script:WaitForChild("FX")

    local Incoming = hum:LoadAnimation(Anims:WaitForChild("RaiselKick"))
    local HitKick = hum:LoadAnimation(Anims:WaitForChild("HitKick"))

    if Action == "FirstMove" then
        if firstmvDb == false then
        print("ACCION EJECUTADA")
            firstmvDb = true
            delay(4,function()
                firstmvDb = false
            end)
            Incoming:Play()

            local Pos = humrp.CFrame * CFrame.new(0,40,0)
            local BP = Instance.new("BodyVelocity",humrp)
            BP.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
            BP.Position = Pos.p
            BP.D = 10
            BP.P = 50
            game.Debris:AddItem(BP,1)
        end
    end
end)

0
Can you post the script so we can see what's wrong with it? 2_MMZ 1059 — 3y
0
already posted it in the answers ImDragron 7 — 3y
0
Don't post it as an answer. Instead, edit your question. Position is not a property of a bodyvelocity, but we don't know what exactly you want to achieve with this, do you want to fling the player upwards? Also, don't use the 2nd parameter of Instance.new and instead parent the object after setting its properties. There is a PSA regarding this Rare_tendo 3000 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago

Body velocity does not have a position attribute. You're probably confusing it with the "BodyPosition".

Ad

Answer this question