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

Workspace.Part.Script:8: Expected ')' (to close '(' at line 4), got '10'?

Asked by 4 years ago
local tween = game:GetService("TweenService")
local tweenPart = script.Parent

local tweeningInformation = TweenInfo.new(
5,
Enum.EasingStyle.Cubic,
Enum.EasingDirection.In
10,
true,
2
)

local props = { 
    Size = Vector3.new(14.455, 18.22, 17.99);
    Color = Color3.new(255, 0, 0);
}
local tweener = tweenService.Create(Part,tweeningInformation,props,)
tween:Play()

2 answers

Log in to vote
0
Answered by
blazar04 281 Moderation Voter
4 years ago
Edited 4 years ago

You forgot the comma after Enum.EasingDirection.In Also, the last two lines should be

local tween= TweenService:Create(tweenPart, tweeningInformation, props)
tween:Play()

Updated script:

local TweenService = game:GetService("TweenService")
local tweenPart = script.Parent

local tweeningInformation = TweenInfo.new(
    5,
    Enum.EasingStyle.Cubic,
    Enum.EasingDirection.In,
    10,
    true,
    2
)

local props = { 
    Size = Vector3.new(14.455, 18.22, 17.99),
    Color = Color3.new(255, 0, 0)
}

local tween = TweenService:Create(tweenPart, tweeningInformation, props)
tween:Play()
Ad
Log in to vote
0
Answered by
Subsz 366 Moderation Voter
4 years ago
Edited 4 years ago

You have an extra "," at this line, you're using "tweenservice.Create" but it's "tweenservice:Create" and you're using the wrong variables, aswell as the fact that you're using Color3.new() but your intended version is Color3.fromRGB. Here's a fixed version

local tweenService = game:GetService("TweenService")
local tweenPart = script.Parent

local tweeningInformation = TweenInfo.new(
5,
Enum.EasingStyle.Cubic,
Enum.EasingDirection.In
10,
true,
2
)

local props = { 
    Size = Vector3.new(14.455, 18.22, 17.99);
    Color = Color3.fromRGB(255, 0, 0)
}
local tween = tweenService:Create(tweenPart,tweeningInformation,props)
tween:Play()

Here's the fixed version :

Answer this question