Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can I tween a model?

Asked by
Kegani 31
6 years ago

Hello

So first off note that I suck at tweening.

            local e = plr.Character.HumanoidRootPart.Position
            local ab = Vector3.new(e.x, e.y, e.z)
            local TweenService = game:GetService("TweenService")
            local sponsorPart = game.Workspace.SponsorChute
            for i,v in pairs(sponsorPart:GetChildren()) do
                local goal = {}
                goal.Position = ab
                local tweenInfo = TweenInfo.new(5) -- time it takes for the tween to happen
                local tween = TweenService:Create(sponsorPart, tweenInfo, goal)
                tween:Play()
            end

So I tried using this script but then I noticed the part wasn't defined, so... I'm lost. Would tweening each part 1 by 1 work?

Thanks

0
Models have a Property called 'PrimaryPart'. With this, you can use SetPrimaryPartCFrame and move the entire model at one time. As for using TweenService with that method, I'm not sure if that's possible. If not, loops are another option. PreciseLogic 271 — 6y

Answer this question