Tween error with the number "6"

I made a tween but the number “6” gives me this error:

MultiLineStatement: (97,1) Statement spans multiple lines; use indentation to silence

this is the script:

local Plat = game.Workspace.Platform

local Ts = game:GetService("TweenService")

local info = TweenInfo.new(

6, --- error

Enum.EasingStyle.Sine,

Enum.EasingDirection.In,

0,

false,

2)

local goal = {Position = Vector3.new(559.642, 22.791, 431.25)}

local tween = Ts:Create(Plat,info,goal)

Plat.Touched:Connect(function(hit)

if hit.Parent:FindFirstChild("Humanoid") then

tween:Play()

end

end)

You shouldn’t space out function parameters, as it will cause this.
Do this instead:

local info = TweenInfo.new(6, Enum.EasingStyle.Sine, Enum.EasingDirection.In, 0, false, 2)
1 Like