Is there a way to print the position of a MODEL?

Hello, is there a way to print out the position of a MODEL, not a part.

Please tell me, thanks!

4 Likes

I’ve answered a similar question to this a while ago. You can get the model’s center position by using Model:GetBoundingBox().

In this case, you can do:

local model = workspace.Model
local orientation = model:GetBoundingBox()
print(orientation)

That will return a CFrame value, you can convert it to Vector3 by doing orientation.p

15 Likes

Thanks!!!

TAGS: HEART BUTTON NOT WORKING

1 Like

Also, does this code works to move the part always?

local model = workspace.FireballRain
local orientation = model:GetBoundingBox()

while true do
	orientation.p = orientation.p + Vector3.new(0,0,0.5)
end

No. Position (which is the proper property of a CFrame) is a read-only property describing the position bit of a CFrame. You need to translate the model over. You’ll find a couple of ways to do this if you look up the Model class, CFrame datatype and Vector3 datatype respectively. :slightly_smiling_face:

1 Like