local Weld = Instance.new("Weld")
Weld.Name = "Weld"
Weld.Parent = NGrimoire1
Weld.Part1 = NGrimoire1
Weld.Part0 = Char:WaitForChild("HumanoidRootPart")
Weld.C1 = CFrame.new(-2,0,2) * CFrame.Angles(math.rad(0),math.rad(280),math.rad(0))
I wanted to know if it was possible to tween the weld position from one to another? If it possible can you show me an example of changing the CFrame position to another?
Intencidy
(smelvin)
February 6, 2021, 7:17am
#2
Try doing
game:GetService("TweenService"):Create(Weld, TweenInfo.new(duration), {C0 = C1 -- or the opposite, depends on what you want})
More on Tween service here .
Where do I put the CFrame at? I’m confused can you explain more.
Intencidy
(smelvin)
February 6, 2021, 7:35am
#4
You just put the weld in there.
I would highly suggest taking a look at the following Developer Forum thread which provides a lot of insight into Tweening Models efficiently, as there can be some unintended side effects over time if it’s not done properly.
Edit (06/30/2021): Due to the release of the new pivot APIs and the thankful deprecation of SetPrimaryPartCFrame, the legacy method of CFraming is now also appropriate and you do not necessarily need to use this welding method. Do note that the pivot CFrame is different from the PrimaryPart CFrame though, so you will have to account for that when writing your proxy objects.
Edit (05/31/2023): Roblox has an official code sample for model tweening! It’s very lightweight and covers the necessities…
1 Like
Can I see an example of both welds. The first position then the second position of the weld position it going to be tweened to.