Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

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

Asked by 3 months 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 2309 — 3mo
0
edited my answer raid6n 2309 — 3mo
0
edited again raid6n 2309 — 3mo
0
edited again raid6n 2309 — 3mo
View all comments (2 more)
0
edited again raid6n 2309 — 3mo
0
edited the edit raid6n 2309 — 3mo

3 answers

Log in to vote
0
Answered by
raid6n 2309 Moderation Voter Community Moderator
3 months ago
Edited 3 months 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 — 3mo
0
try again, i edited it raid6n 2309 — 3mo
0
i did that many times AriyanHacker29 22 — 3mo
0
did ou capitalize the p raid6n 2309 — 3mo
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 — 3mo
0
this is the code that i wrote AriyanHacker29 22 — 3mo
0
noooooo raid6n 2309 — 3mo
0
i sent full code raid6n 2309 — 3mo
1
try setting the sixth argument to 0 mikey2019d 38 — 3mo
0
^ raid6n 2309 — 3mo
0
still nothing AriyanHacker29 22 — 3mo
0
you sure? make nil 0 raid6n 2309 — 3mo
0
i am sure AriyanHacker29 22 — 3mo
0
yes mikey2019d 38 — 3mo
0
did but didnt work AriyanHacker29 22 — 3mo
0
edited raid6n 2309 — 3mo
0
still nothing AriyanHacker29 22 — 3mo
0
try 1 more time raid6n 2309 — 3mo
0
did but didnt work AriyanHacker29 22 — 3mo
0
fixed it raid6n 2309 — 3mo
0
still nothing AriyanHacker29 22 — 3mo
0
lets just give up AriyanHacker29 22 — 3mo
0
i made something like the first code a few days ago and it worked AriyanHacker29 22 — 3mo
Ad
Log in to vote
0
Answered by 3 months ago
Edited 3 months 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 — 3mo
Log in to vote
0
Answered by
zadobyte 692 Moderation Voter
3 months 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