Why my part doesnt want to be tween

Hello guys, im having a problem with a part.

The part don’t wanna be tween, I want to tween the part like the video

but this script just tween the little part and not the sign

here is how I made in the workspace
image

and this is my script

local TweenService = game:GetService("TweenService")
local part = game.Workspace:WaitForChild("Chapter2"):WaitForChild("Chapter")

local Tweeninfo = TweenInfo.new(
	3, 
	Enum.EasingStyle.Sine, 
	Enum.EasingDirection.InOut, 
	-1, 
	true)

local tween = TweenService:Create(part.PrimaryPart, Tweeninfo, {Orientation = part.PrimaryPart.Orientation + Vector3.new(-50, 0, 0)})
tween:Play()

if you guys can help me i’ll appreciate it :slight_smile:

3 Likes

What’s Chapter’s Primary Part property set to?

1 Like

Your part.PrimaryPart might actually be “Handler”, which I assume is the little part rotating. You might want to change your second line of code with:

local part = workspace:WaitForChild("Chapter2"):WaitForChild("Chapter"):WaitForChild("Handler"):WaitForChild("Chapter2")

Try seeing if this fixes your issue. My assumption here was that your part called Handler is the little thing rotating and is also the PrimaryPart of Chapter, so I suggest changing the definition of the variable part to the Chapter2 part.

2 Likes

Is the part that’s not turning anchored? That was the case when I first had this problem too.

2 Likes

The sign probably isn’t anchored.

2 Likes

Thats working but, not like I want

I want the sign like have an effect of the wind like the first video

1 Like

The primarypart is the handler

No, the sign is not anchored but it still doesnt want to move…

1 Like

Is the Handler part anchored or unanchored?

no, the sign part is not anchored

Could you sent a RBXM of the sign so we can debug better?

singModel.rbxm (9.0 KB)

1 Like

u cant move models just by tweening their primary part

local TweenService = game:GetService("TweenService")
local part = game.Workspace:WaitForChild("Chapter2"):WaitForChild("Chapter")

local Tweeninfo = TweenInfo.new(
	3, 
	Enum.EasingStyle.Sine, 
	Enum.EasingDirection.InOut, 
	-1, 
	true
)

local cframeValue = Instance.new("CFrameValue")
cframeValue.Value = part:GetPivot()
cframeValue.Changed:Connect(function(newCframe)
    part:PivotTo(newCframe)
end)
local tween = TweenService:Create(cframeValue, Tweeninfo, {Value = part:GetPivot() * CFrame.Angles(math.rad(-50), 0, 0)})
tween:Play()
tween.Completed:Connect(function()
    cframeValue:Destroy()
end)

also use body constraints or render stepped if u want repeated rotation

I’ve figured it out. Your script is manipulating the Orientation which apparently welds don’t correlate with. I changed the script to manipulate the CFrame and it works.

local tween = TweenService:Create(part.PrimaryPart, Tweeninfo, {CFrame = part.PrimaryPart.CFrame * CFrame.Angles(math.rad(-50), 0, 0)})

Yes, thats working, thank you :slight_smile:

You can tween models if everything in the model is unanchored and welded to the anchored PrimaryPart.

which like 90% dont do :person_shrugging:

But thats what I did in the model but the sign didnt want to move

Just wondering, why are you creating a CFrameValue instead of just setting the cframe as a variable?

tracking variable changes is a hassle