Script not working

Hi,

I just made a script so it will tween a part +5 studs on a certain axis. But the script was sadly not working.

local tweenService = game:GetService("TweenService")

local Properties = {

    script.Parent.Position + Vector3.new(0, 5, 0)

}

local TweenInformation = TweenInfo.new(1,Enum.EasingStyle.Sine,Enum.EasingDirection.Out)

local tween = tweenService:Create(script.Parent,TweenInformation,Properties)

wait(.01)

tween:Play()

Is there anyone that can help me with this script? Thanks!

File

1 Like

Try this:

local tweenService = game:GetService("TweenService")

local Properties = {

    Position = script.Parent.Position + Vector3.new(0, 5, 0)

}

local TweenInformation = TweenInfo.new(1,Enum.EasingStyle.Sine,Enum.EasingDirection.Out)

local tween = tweenService:Create(script.Parent,TweenInformation,Properties)

wait(.01)

tween:Play()
1 Like