#resolved
1 messages · Page 1 of 1 (latest)
pivot to
model:PivotTo(<your cframe>)
model:PivotTo(<your cframe>)
alright
this will move based on where the PrimaryPart is right
uh
world space
yes but like
if you make the cframe 5,2,3 it will move the model to 5,2,3
i need the PrimaryPart to go to the cframe im giving it
and the rest of the model to follow with it
not the center of the model
so i do model.PrimaryPart:PivotTo()?
** You are now Level 12! **
the circled point is the pivot
ye
oh it already does that for me
ok let me try it then
uh how can i convert a Vector3 to a CFrame
the most basic way is CFrame.new(x, y, z), and with rotation it'd look like CFrame.new(x, y, z) * CFrame.Angles(rX, rY, rZ)
rX, rY, and rZ should be in radians
so if you wanted the rY to be 45 degrees then you'd do 45 in radians
theres a resolved tag
got it on now
if i wanted to make them face a random direction (for the Y axis), should i be using random(-180,180), random(0,360), or random(0,180)
oh
Random.new():NextNumber(-360, 360)
but make sure its in radians
you can directly use math.rad(number)
is that the same thing as just math.random(-360,360) though
ohhh
eh i dont think i need it that fine-point
but that might be helpful some other time
-360, 360 should be the sweet spot
since 0,360 will only be clockwise