Hello, I’m working on a game similar to PLS DONATE and I have different stands that the player can collect and use. I’m just having trouble with switching out the model for the new one since models don’t have a direct ‘Position’ and ‘Orientation’ value like parts do.
Something like this…
Destroy:
Clone Fall into the ‘1’ model (there will be more later)
And then adjusts its position and orientation to be the same as the stand that was just deleted.
You can try this (given that old stand is a model)
local OldStand = -- old stand
local NewStand = -- new stand
local OldStandCFrame = OldStand.CFrame -- cframe both holds position and orientation
OldStand:Destroy()
local Clone = NewStand:Clone()
Clone.CFrame = OldStandCFrame
Clone.Parent = game.Workspace.Stands.1
Use :GetPivot and :PivotTo()
Models are PVInstances so it should work.
local OldStand = -- old stand
local NewStand = -- new stand
local OldStandPivot = OldStand:GetPivot() -- cframe both holds position and orientation
OldStand:Destroy()
local Clone = NewStand:Clone()
Clone:PivotTo(OldStandPivot)
Clone.Parent = game.Workspace.Stands.1