You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
-
What is the issue? It’s giving me an error on something I’m unfamiliar with
-
What solutions have you tried so far? Looking on youtube
local tweenpart = script.Parent
local tweenInfo = TweenInfo.new(20, Enum.EasingStyle.Linear,Enum.EasingDirection.In,0, false, 26)
local tweenGoal = {Size = Vector3.new(111.5, 130.5, 112)}
local anim = ts:Create(tweenpart,TweenInfo,tweenGoal)
anim:Play()
What’s the error? Can you show us all of the code rather than just a snippet?
You forgot to make a variable for tween service. You just have ts:Create()
Replace this line of code with this one.
local anim = ts:Create(tweenpart, tweenInfo, tweenGoal)
Instead of specifying a variable, you created a new constructor. I think this may be the cause of the error.
Code
local tweenpart = script.Parent
local tweenInfo = TweenInfo.new(20, Enum.EasingStyle.Linear,Enum.EasingDirection.In,0, false, 26)
local tweenGoal = {Size = Vector3.new(111.5, 130.5, 112)}
local anim = ts:Create(tweenpart,tweenInfo,tweenGoal)
anim:Play()
I hope this helps.
1 Like
local tweenService = game:GetService("TweenService")
local tweenpart = script.Parent
local tweenInfo = TweenInfo.new(
20,
Enum.EasingStyle.Linear,
Enum.EasingDirection.In,
0,
false,
26
)
local tweenGoal = {Size = Vector3.new(111.5, 130.5, 112)}
local anim = tweenService:Create(tweenpart, TweenInfo, tweenGoal)
anim:Play()
You just forgot to get the “TweenService” service.
oops simple mistake sorry haha