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

Tween Service: Error < Size '=' | ?

So, I was learning Tween and the TweenService in Roblox. In the end. I got a result it said:

"08:45:59.188 - Workspace.Part.Script:17: Expected ')' (to close '(' at line 16), got '='" I am guessing it happened where I had to put in the size.

Heres my script:


local TweenService = game:GetService("TweenService")

local Part = script.Parent

local Workspace = game:GetService("Workspace")

local Info = TweenInfo.new(

10,
Enum.EasingStyle.Exponential,
Enum.EasingDirection.Out,
100,
true,
1
)

local Goals = ( Part.Size = Vector3.new(100, 100, 100); )

local UsedPart = TweenService:Create(Part, Info, Goals)

UsedPart:Play()


It said that the error was the '='. Right after the size property was being set. Anybody know how to fix this?

2 comments

0

Ok, there may be some more problems with the script.

0

Almost 100000 questions!!!

3 answers

local Goals = ( Part.Size = Vector3.new(100, 100, 100); ) is incorrect. If you trying to make a table, you should use wavy brackets. local Goals = { Part.Size = Vector3.new(100, 100, 100); } You can keep the semicolon

You do not use the paranthesis () when modifying a table, you should create a table with these {}

Use the script i fixed for you:

local TweenService = game:GetService("TweenService")

local Part = script.Parent

local Workspace = game:GetService("Workspace")

local Info = TweenInfo.new(
	10,
	Enum.EasingStyle.Exponential,
	Enum.EasingDirection.Out,
	100,
	true,
	1
)

local Goals = {}

Goals.Size = Vector3.new(100, 100, 100)

local UsedPart = TweenService:Create(Part, Info, Goals)

UsedPart:Play()

1 comment

0

This one is the correct one to use when tweening, use goal.property-of-object when tweening

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