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

My BodyPosition script puts my character into the top-middle of the baseplate?

Asked by 6 years ago

Here's my script:

function onTouched(hit)
    wait()
    local character = hit.Parent
    if character and character:findFirstChild("Humanoid") then
        local pos = script.Parent.Parent.PartV
        local b = Instance.new("BodyPosition")
        b.Position = Vector3.new(pos.Position)
        b.maxForce = Vector3.new(500000000, 500000000, 500000000)
        b.Parent = character.Torso
        wait(3)
        b.Parent = nil
    end
end

script.Parent.Touched:connect(onTouched)

I really don't see a problem with it. Can someone help me identify the problem?

To give you an idea of what I'm saying: https://i.gyazo.com/dbc6007fff19fa2e1e5c7947068f505b.gif

1
make the y value of b.maxforce 0 wookey12 174 — 6y
0
it pushes me towards the middle of the baseplate GIassWindows 141 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

"PartV" might be positioned in the middle of the baseplate. If not, make sure its anchored so it wont fly off somewhere else.

Ad

Answer this question