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

How do I work with BodyPosition?

Asked by 8 years ago

I am trying to make a floating orb above a pedestal for my lobby, but when I use this script, it seems to float to the center of the map, 50 units above the center. Am I using the wrong body object, or is my script wrong?

local float = game.Workspace.Thruster
local bodypos = float.BodyPosition
local finish = game.Workspace.Ending

bodypos.position = finish.position

1 answer

Log in to vote
0
Answered by 8 years ago

I'm not sure if this is what you were looking for, but this is what I came up with.

wait()
local p             = script.Parent
local start         =p.Position
local endpos        =start+Vector3.new(0,-5,0)


p.BodyPosition.position=endpos
0
This works! Thanks for the fix! What did I do wrong? User#210 0 — 8y
0
If finish is a part, it's Position, not position. I'm not really sure what the defined varibles are supposed to be. SimplyRekt 413 — 8y
Ad

Answer this question