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

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

Asked by 4 years ago

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)
0
tween:Play() raid6n 2196 — 4y
0
edited my answer raid6n 2196 — 4y
0
edited again raid6n 2196 — 4y
0
edited again raid6n 2196 — 4y
View all comments (2 more)
0
edited again raid6n 2196 — 4y
0
edited the edit raid6n 2196 — 4y

3 answers

Log in to vote
0
Answered by
raid6n 2196 Moderation Voter Community Moderator
4 years ago
Edited 4 years ago

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()
0
i tried that but didnt work AriyanHacker29 22 — 4y
0
try again, i edited it raid6n 2196 — 4y
0
i did that many times AriyanHacker29 22 — 4y
0
did ou capitalize the p raid6n 2196 — 4y
View all comments (19 more)
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) AriyanHacker29 22 — 4y
0
this is the code that i wrote AriyanHacker29 22 — 4y
0
noooooo raid6n 2196 — 4y
0
i sent full code raid6n 2196 — 4y
1
try setting the sixth argument to 0 mikey2019d 43 — 4y
0
^ raid6n 2196 — 4y
0
still nothing AriyanHacker29 22 — 4y
0
you sure? make nil 0 raid6n 2196 — 4y
0
i am sure AriyanHacker29 22 — 4y
0
yes mikey2019d 43 — 4y
0
did but didnt work AriyanHacker29 22 — 4y
0
edited raid6n 2196 — 4y
0
still nothing AriyanHacker29 22 — 4y
0
try 1 more time raid6n 2196 — 4y
0
did but didnt work AriyanHacker29 22 — 4y
0
fixed it raid6n 2196 — 4y
0
still nothing AriyanHacker29 22 — 4y
0
lets just give up AriyanHacker29 22 — 4y
0
i made something like the first code a few days ago and it worked AriyanHacker29 22 — 4y
Ad
Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

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()
0
it has 2 variables with the same name, it wont work AriyanHacker29 22 — 4y
Log in to vote
0
Answered by
zadobyte 692 Moderation Voter
4 years ago

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.

Answer this question