T9_YTB
(TriTord)
October 26, 2024, 12:01am
#1
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
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
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
GuinPeng
(Matcha)
October 26, 2024, 4:04am
#4
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
T9_YTB
(TriTord)
October 26, 2024, 11:08am
#6
Thats working but, not like I want
I want the sign like have an effect of the wind like the first video
1 Like
T9_YTB
(TriTord)
October 26, 2024, 11:08am
#7
The primarypart is the handler
T9_YTB
(TriTord)
October 26, 2024, 11:09am
#8
No, the sign is not anchored but it still doesnt want to move…
1 Like
Is the Handler part anchored or unanchored?
T9_YTB
(TriTord)
October 26, 2024, 11:13am
#10
no, the sign part is not anchored
Could you sent a RBXM of the sign so we can debug better?
Mystxry12
(Mystxry)
October 26, 2024, 11:22am
#13
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)})
T9_YTB
(TriTord)
October 26, 2024, 11:28am
#15
Yes, thats working, thank you
You can tween models if everything in the model is unanchored and welded to the anchored PrimaryPart.
T9_YTB
(TriTord)
October 26, 2024, 11:31am
#18
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?
Mystxry12
(Mystxry)
October 26, 2024, 11:33am
#20
tracking variable changes is a hassle