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

How can i run tween on a local script?

Asked by 2 years ago

I'm trying to tween a part with a localscript but it doesn't run it Here's my script:

local tweenservice = game:GetService("TweenService")
local part = workspace.Elevator1 -- Not a model its a part

local tweeningInfo = TweenInfo.new(
    3.6,
    Enum.EasingStyle.Sine,
    Enum.EasingDirection.InOut,
    math.huge,
    true,
    3
)

local partProps = {
    Position = Vector3.new(9.6, 59.1, 22.05)
}

local Tween = tweenservice:Create(part, tweeningInfo, partProps)
Tween:Play()
0
There's probably something wrong with your part, because looking at your code, there's nothing wrong with it, and I just tested it and it worked. Rinpix 639 — 2y
0
My part is normal but the tween doesn't play blackmaskofthenoob 0 — 2y
0
maybe try workspace["Elevator1"] ? I don't think it likes numbers in names. Miniller 562 — 2y

Answer this question