#How to make this Tween Work?

1 messages · Page 1 of 1 (latest)

grim dragon
#

Trying to make this part rotate 90 degrees on the X axis, but the thing's not moving. Help?
local info = TweenInfo.new(1.5, Enum.EasingStyle.Sine, Enum.EasingDirection.In, 0, false, 0) local tween = TS:Create(box.Hinge, info, {Orientation = box.Hinge.Orientation * Vector3.new(90,0,0)}) tween:Play()

unreal comet
#

use + instead of *

#

also look into cframes

grim dragon
#

tried that, same result

unreal comet
#

much better than orientation

grim dragon
unreal comet
#

it is

#

but cframes are much better to use

grim dragon
#

alr lemme see

#

no difference

frigid osprey
#

💀

grim dragon
#

?

frigid osprey
#

ok so

#

first

#

box.Hinge.CFrame * CFrame.angles(math.rad(90), 0, 0)

grim dragon
#

said i called a nil value

frigid osprey
#

oh

#

capital a

grim dragon
#

oh yea i was wondering why it was yellow

#

still nothing happening though

frigid osprey
#

well yeah change it from orientation to CFrame

#

💀

grim dragon
#

yeah i did

#

still nothing

frigid osprey
#

show

grim dragon
round moss
#

try adding the 90 degress instead of multiplying it.

{Orientation = box.Hinge.Orientation + Vector3.new(90, 0, 0)}

frigid osprey
#

get this chatgpt ahh out

quiet narwhal
#

are you trying to rotate the whole box

frigid osprey
grim dragon
#

said it expected a CFrame

frigid osprey
quiet narwhal
grim dragon
quiet narwhal
#

so like this?

grim dragon
#

nah other way around

#

i want the hinge to act the same as an origin would in blender

quiet narwhal
#

so why do you have box.Hinge then

grim dragon
#

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

quiet narwhal
#

can you ss the explorer

#

oh

#

so fixed?

grim dragon
grim dragon
quiet narwhal
#

oh i see

#

ok so

#

tweening wont move the lid

#

itll only move hinge

grim dragon
#

i mean if I move the hinge, wouldnt the lid move with it?

quiet narwhal
#

not with tweens

frigid osprey
#

just add a weldconstraint

quiet narwhal
#

make the hinge visible and see

frigid osprey
#

💀

quiet narwhal
#

doesnt work like that either

frigid osprey
#

it will

#

😇

grim dragon
#

hold on mr. chat gpt messed me up

frigid osprey
#

are we assuming their gender

frigid osprey
#

or would it be theyre

#

no

#

i lied

#

dont answer that

grim dragon
#

you tried

grim dragon
#

am I missing a property?

quiet narwhal
#

ok so

shrewd topazBOT
#

studio** You are now Level 1! **studio

quiet narwhal
#

make it a model

grim dragon
#

oh right im still dealing with the nil value from before

frigid osprey
#

did you set the part0 and part1

quiet narwhal
#

set the primary part to the hinge

#

then use a cframe value and tween that

grim dragon
#

???

#

i dont follow the logic

quiet narwhal
#

use getpropertychangedsignal

frigid osprey
#

do not listen to this guy

grim dragon
#

yeah im so confused there

frigid osprey
#

hes either incredibly misinformed or using chatgpt

grim dragon
frigid osprey
#

💀

#

one second

grim dragon
#

this is my script rn, theres a nil value somewhere

frigid osprey
#

show output

frigid osprey
#

just leave it blank and itll default to quad

grim dragon
#

alr

frigid osprey
#

leave only

#

the first argument

grim dragon
#

so i still gotta deal with the nil value so it'll work tho

frigid osprey
frigid osprey
#

so trouble shoot from there

grim dragon
#

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

frigid osprey
#

can you screenshare

grim dragon
#

screenshot?

frigid osprey
#

do you consent to a possible seizure maybe

grim dragon
#

i'm really hoping autocorrect is messing you up rn

frigid osprey
#

umm

#

no more comments on that topic please

grim dragon
#

not even gonna ask what you mean by that

frigid osprey
#

thanks

quiet narwhal
#
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()