Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

The tween of a part is not working, Why is that?

I wrote this simple code but it does not work, Please help thanks

local tween = game:GetService("TweenService")
local tweeninfo = TweenInfo.new(10, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 1000, true, nil)
local tweenProperties = {Position = Vector3.new(-16, 10, -6)}

tween:Create(script.Parent, tweeninfo, tweenProperties)

6 comments

0

tween:Play()

0

edited my answer

0

edited again

0

edited again

0

edited again

0

edited the edit

3 answers

make sure you add tween:Play()

local TweenService = game:GetService("TweenService")
local tweeninfo = TweenInfo.new(10, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 1000, true, 0)
local tweenProperties = {Position = Vector3.new(-16, 10, -6)}

local tween = TweenService:Create(script.Parent, tweeninfo, tweenProperties)
tween:Play()

23 comments

0

i tried that but didnt work

0

try again, i edited it

0

i did that many times

0

did ou capitalize the p

0

local tween = game:GetService("TweenService") local tweeninfo = TweenInfo.new(10, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 1000, true, nil) local tweenProperties = {Position = Vector3.new(10, 0.05, -6)} tween:Play(script.Parent, tweeninfo, tweenProperties)

0

this is the code that i wrote

0

noooooo

0

i sent full code

1

try setting the sixth argument to 0

0

^

0

still nothing

0

you sure? make nil 0

0

i am sure

0

yes

0

did but didnt work

0

edited

0

still nothing

0

try 1 more time

0

did but didnt work

0

fixed it

0

still nothing

0

lets just give up

0

i made something like the first code a few days ago and it worked

Try this

local tween = game:GetService("TweenService")
local tweeninfo = TweenInfo.new(10, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 1000, true, 0)
local tweenProperties = {Position = Vector3.new(-16, 10, -6)}
local tween = tween:Create(script.Parent, tweeninfo, tweenProperties)
tween:Play()

1 comment

0

it has 2 variables with the same name, it wont work

Possible fixes: Try not setting the delay (last argument) to nil and set it to 0 instead. Make sure the part isn't anchored and make sure that part isn't in the same spot you're tweening it to.

This discussion is preserved as it was. New answers, comments, and votes are closed.