#how to place a model infront of a player when a key on the keyboard is pressed?
1 messages · Page 1 of 1 (latest)
so it's same as for parts
but instead of just part cframe
you need to set primary part for model
and use setprimarypartcframe
like this
chargec it's a model
and in () it's where you want to put it
that only works if the model is welded
if the model is fully anchored and not welded then use PivotTo
works for me even if the model is anchored
never used pivotTo
PivotTo moves the entire model while SetPrimaryPartCFrame moves the primary part
the latter works if all the parts in the model are unanchored and welded to the primary part except the primary part
i just checked and it moved the entire thing
Super quick bit of info from the docs:
This function has been superseded by PVInstance:PivotTo() which acts as a more performant replacement and does not change your code's behavior. Use PVInstance:PivotTo() for new work and migrate your existing Model:SetPrimaryPartCFrame() calls when convenient.
alr but tbh never used PivotTo even when i was moving the whole model
idk how it works for me then
oh what
just saying from my own experience
Deprecated doesn't mean removed, just that it may be removed in the future, like a warning
it means that it should not be used and is only kept for backwards compatibility
** You are now Level 32! **
so apparently thats what MoveTo does
bruh why are they making something new that has the same meaning
They both work the same way, but one is not deprecated
and it's not only this one function
the function called SetPrimaryPartCFrame moves the entire model and the function called MoveTo sets the primary part's cframe
pivotto uses the model's pivot
which is better
Because they updated it and made it better, but didn't want to break anything, so out of caution they made it a new function
well just update it without removing old functions and just add new ones?
but SetPrimaryPartCFrame still moves everything else too
keep the same name for it too
yeah thats what i said
Well having a hundred functions that all do the same thing is confusing, so they'd rather be like "hey that's old, so use this one instead"