I want to make a egg hatching system which displays the pet which has been hatched spin.
I welded all the parts of the pet to a hit box which I rotated using the tween service, which was displayed in a viewport frame. h
However, the welded parts are not spinning at all, the only thing that is is the hit box itself.
I tried searching the devforum for similar topics as well as bug reports, I did find something but it didn’t work either. I tried re-welding the model in different ways, however that didn’t work either.
Script:
local PetRotationTween = TweenService:Create(ChosenPetHitbox,TweenInfo.new(5,Enum.EasingStyle.Sine,Enum.EasingDirection.Out,0,false,2.5), {CFrame = ChosenPetHitbox.CFrame * CFrame.Angles(0,math.rad(175),0)})
PetRotationTween:Play()
Welds:
Any sort of help is very much appreciated!
Update: It works perfectly fine in the workspace but doesn’t work at all when placed in viewport frame.
to achieve moving all parts you get all the offsets from primary part. you do tween to each of them and refresh the tween rapidly for the smoothly. this is the only solution i can think of to achieve that using tween
i am sorry i am very new at helping people but i also think you can use renderstepped to arrange the parts using offsets from the primary part, with so you can still do tween
local main = workspace.Model.main
local ts = game:GetService("TweenService")
local tween = ts:Create(main, TweenInfo.new(5), {
CFrame = CFrame.new(0,30,0)
})
tween:Play()
print("Playing")
You should have the primary part anchored if you’re tweening its location. Otherwise the engine would just apply physics to it and it would just keep falling and not moving.
If you want physics to still apply to it properly, use a Body object to move it.
Sorry, I meant a model file we can put in a blank place to test with. You can remove any proprietary meshes if needed. Because if the code that I showed is working but not working for your particular model we need to dig a bit deeper.