TweenPosition of a part

I really need help knowing how to tween position of a part Please tell me what I’m missing

local tweenService = game:GetService("TweenService")
local Properties = {
Position = Vector3.new(37, 3.5, -7.5)
}

local TweenInfoo = 
TweenInfo.new(1,Enum.EasingStyle.Sine,Enum.EasingDirection.Out)
local tween = tweenService:Create(script.Parent,TweenInfoo,Properties)

wait(5)
tween:Play

First of all your tween info is incomplete, and I’m pretty sure you don’t need the curly brackets for the Properties variable.

1 Like

if i take it away it says there is an error

if i take it away it says there is an error under the equal sign

Try,
local Properties = Vector3.new(37, 3.5, -7.5)

1 Like

That didn’t work I’m going to go found a yt video

Oh lol, didn’t even notice your tween:Play. It is suppose to be tween:Play()

3 Likes

The tween info is fine, it can be as short as TweenInfo.new(1), and yes, you do need the curly brackets for the properties table.

1 Like

Your not putting in all of the arguments for the tween info, there is still 3 arguments you haven’t entered.

1 Like

Aensvey is right you forgot to add () in tween:Play()

here is the correct code format:

local tweenService = game:GetService("TweenService")
local Properties = {
Position = Vector3.new(37, 3.5, -7.5)
}

local TweenInfoo = TweenInfo.new(1,Enum.EasingStyle.Sine,Enum.EasingDirection.Out)
local tween = tweenService:Create(script.Parent,TweenInfoo,Properties)

wait(5)
tween:Play()


1 Like

Don’t you need to put all of the arguments in for tween info or?

1 Like

no, you dont. All you need is the first 3 tuples. The rest aren’t really needed to make a tweeninfo.

2 Likes

Oh okay, I thought you just needed to enter them. I always would just set them to 0 or False bc I thought you needed to have them.

2 Likes

You only need the time, the other you can put so it’s more detailed to your liking but, you really only need the time.

TweenInfo.new(1) --Would work

Sorry if I sound rude! Just wanted to inform :>

2 Likes