Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

2 comments

1

make the y value of b.maxforce 0

0

it pushes me towards the middle of the baseplate

1 answer

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

This discussion is preserved as it was. New answers, comments, and votes are closed.