line 33 and 34 are giving me a error, I’m trying to tween this Box so it can open
Make it {CFrame = CFrame.new()} instead of just {CFrame.new()}
adding on to this
did you mean local TweenOpen = TweenService:Create(Hinge, info, OpenProp)
?
instead of local TweenOpen = TweenService:Create(Hinge, OpenProp, OpenProp)
Oh yeah lol I already fixed that
Ok that works but now I’m having other problem, some reason the top piece of the box flicks away
is the top piece anchored???
the top piece is the top of the box the thing that opens i just have it welded to other part called hinge and the tween is not gonna work if thats anchored
Anchored parts can be tweened.
Welded parts are much harder to tween.
well i removed the weld and anchored, but then the tween doesn’t work
nvm someone helped me with this code
local OpenProp = {CFrame = Hinge.CFrame * CFrame.Angles(math.rad(90), 0, 0)}
now it doesn’t flick away but thanks for the help
Make sure you have some debounce to account for the multiplication of CFrames. If not, you could probably end with the hinge spinning too far back.
It might be best to just log the CFrame of the hinge prior to multiplication.
local Origin = Hinge.CFrame
local OpenProp = {CFrame = Origin * CFrame.Angles(math.rad(90), 0, 0)}
Just a little change goes a long way! Happy it worked out for you!
oh ok yeah imma make sure I do that