#How to make this Tween Work?
1 messages · Page 1 of 1 (latest)
tried that, same result
much better than orientation
I figured orientation was just the rotation
💀
?
said i called a nil value
show
try adding the 90 degress instead of multiplying it.
{Orientation = box.Hinge.Orientation + Vector3.new(90, 0, 0)}
get this chatgpt ahh out
are you trying to rotate the whole box
ill have a look in a few when im home
said it expected a CFrame
mhm hes pulling out the chatgpt
?
trynna rotate a part with something parented to it
so like this?
so why do you have box.Hinge then
wait
am i stupid lemme check this
oh my god lemme fix this 💀
OHHH nevermind
yeah the box is a bigger thing, i have something else parented inside the hinge
so the hinge's child doesn't need to be referenced at all since it's moving with the hinge
no just cleared up a confusion
i mean if I move the hinge, wouldnt the lid move with it?
not with tweens
just add a weldconstraint
make the hinge visible and see
💀
doesnt work like that either
are we assuming their gender
you tried
ok so
** You are now Level 1! **
make it a model
oh right im still dealing with the nil value from before
did you set the part0 and part1
use getpropertychangedsignal
do not listen to this guy
yeah im so confused there
hes either incredibly misinformed or using chatgpt
this is my script rn, theres a nil value somewhere
show output
ok so dont use sine that is terrible
just leave it blank and itll default to quad
alr
so i still gotta deal with the nil value so it'll work tho
(the best one)
ok well it tells you the line number in the error
so trouble shoot from there
it's in the tween line, doesnt say what the nil value is though
and i've got a lot of stuff to work with
can you screenshare
screenshot?
do you consent to a possible seizure maybe
i'm really hoping autocorrect is messing you up rn
no see... we have differing meanings for what "screen shot" means
umm
no more comments on that topic please
not even gonna ask what you mean by that
local ts = game:GetService("TweenService")
local cframeValue = Instance.new("CFrameValue", box)
cframeValue.Value = box.PrimaryPart.CFrame
cframeValue:GetPropertyChangedSignal("Value"):Connect(function()
box:PivotTo(cframeValue.Value)
end)
local info = TweenInfo.new(1.5, Enum.EasingStyle.Sine, Enum.EasingDirection.In, 0, false, 0)
local tween = ts:Create(cframeValue, info, {Value = box.PrimaryPart.CFrame * CFrame.Angles(math.rad(90), 0, 0)})
tween:Play()