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

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

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

local Part = script.Parent
local TweeningInfo = TweenInfo.new(

5,
Enum.EasingStyle.Bounce
Enum.EasingDirection.Out
10,
true,
2
)

local PartProperties = {
	Size = Vector3.new(50,50,50)
	Color = Color3.fromRGB(120,50,65)
	
	
}
local Tween = Tweenservice:Create(Part,TweeningInfo,PartProperties)
Tween:Play

I watched an alvinblox video to get a Jist of it

2 comments

1

Link the tutorial

1 answer

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:

local Part = script.Parent
local Tweenservice = game:GetService('TweenService')

local TweeningInfo = TweenInfo.new(
5,
Enum.EasingStyle.Bounce,
Enum.EasingDirection.Out,
10,
true,
2
)

local PartProperties = {
    Size = Vector3.new(50,50,50),
    Color = Color3.fromRGB(120,50,65)
}

local Tween = Tweenservice:Create(Part,TweeningInfo,PartProperties)
Tween:Play()

3 comments

0

I got this idk y 17:28:00.403 - Workspace.Part.Script:13: Expected '}' (to close '{' at line 11), got 'Color'

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)

0

Sorry, I edited it now. copy it again and try

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