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

Don't Judge me its my first time using Tweening but how can i fix this?

Asked by 5 years ago

20:33:19.872 - Workspace.Lets Tween about that.Script:6: Expected ')' (to close '(' at line 2), got 'Enum'

01local Part = script.Parent
02local TweeningInfo = TweenInfo.new(
03 
045,
05Enum.EasingStyle.Bounce
06Enum.EasingDirection.Out
0710,
08true,
092
10)
11 
12local PartProperties = {
13    Size = Vector3.new(50,50,50)
14    Color = Color3.fromRGB(120,50,65)
15 
16 
17}
18local Tween = Tweenservice:Create(Part,TweeningInfo,PartProperties)
19Tween:Play

I watched an alvinblox video to get a Jist of it

1
Link the tutorial RBLXNogin 187 — 5y

1 answer

Log in to vote
0
Answered by
Hypgnosis 186
5 years ago
Edited 5 years ago

Look at your error. See the number 6? That means that there is an error on line 6 or near it. We can see above line 6, there is no comma after the easing style. There needs to be a comma after every value in the tween info, excepting the last one.

Also, Tween:Play will error as well. It should be written as Tween:Play(). Notice the parentheses.

Below is code corrected for all errors:

01local Part = script.Parent
02local Tweenservice = game:GetService('TweenService')
03 
04local TweeningInfo = TweenInfo.new(
055,
06Enum.EasingStyle.Bounce,
07Enum.EasingDirection.Out,
0810,
09true,
102
11)
12 
13local PartProperties = {
14    Size = Vector3.new(50,50,50),
15    Color = Color3.fromRGB(120,50,65)
16}
17 
18local Tween = Tweenservice:Create(Part,TweeningInfo,PartProperties)
19Tween:Play()
0
I got this idk y 17:28:00.403 - Workspace.Part.Script:13: Expected '}' (to close '{' at line 11), got 'Color' Vortex_Vasne 89 — 5y
0
Nvm i fixed i had to put the } on the same line as Color but i get this 17:44:00.350 - Workspace.Part.Script:16: attempt to index global 'Tweenservice' (a nil value) Vortex_Vasne 89 — 5y
0
Sorry, I edited it now. copy it again and try Hypgnosis 186 — 5y
Ad

Answer this question