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

How to get the position of the middle of a part?

Asked by
alibix123 175
8 years ago

I started with this but the part just spawned somewhere not in the middle:

local source = script.Parent
local part1 = Instance.new("Part", workspace)
part1.Name = "Test"
part1.Position = Vector3.new(source.Position.x /2,source.Size.y+source.Size.y, source.Position.z / 2)

I wanted to use the midpoint formula but I don't really know how to get the corners of a part either.

1 answer

Log in to vote
1
Answered by 8 years ago

The position of the middle of a part is simply part.Position

0
Wow. I feel REALLY dumb now. alibix123 175 — 8y
Ad

Answer this question