Expected ')' (to close '(' at line 12), got 'script'

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!

I’m making elevator with rope constraints.

  1. What is the issue? Include screenshots / videos if possible!

image

image

on ‘script’, it show red underline.

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

Don’t even found single post related to this post.

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

local floor = 0
local debounce = false
local tweenservice = game:GetService("TweenService")
local Rods = script.Parent.Parent.Elevator.RopeConstraint
local originallength = Rods.Length

local ti = {
	0.05
}



local tween = TweenInfo:Create(Rods, ti, {Length = 1})
local tween2 = TweenInfo:Create(Rods, TweenInfo.new(2.90, ti, {Length = originallength})

script.Parent.ClickDetector.MouseClick:Connect(function()
	if not debounce then
		debounce = true
		tween:Play()
		tween.Completed:Wait()
		wait(2)
		tween2.Play()
		tween2.Completed:Wait()
		wait(2)
		debounce = false
	end
end)

I don’t know what categories I should post, I know it’s a bug. But don’t know which categories to post. It’s this lua new version (or deprecated) or bug?

On seperated roblox studio version:

image

Using another studio, when using ‘script’ word. It’s work. But other studio not working.

(I use Luau.)

2 Likes

Looks like you missed a closing bracket at this line:
local tween2 = TweenInfo:Create(Rods, TweenInfo.new(2.90, ti, {Length = originallength})

When corrected it should be:
local tween2 = TweenInfo:Create(Rods, TweenInfo.new(2.90, ti, {Length = originallength}))

Spend more time carefully looking at your code :slight_smile:

3 Likes

Oh, forgot. Im very blind looking at code. It doesn’t show underline. Thanks for solution.