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

Output says there is an ')' expected near '=' ?

So I got this problem, and I do know what it means, What I don't know is where I need to put the ')'

This is my script:

local T = game:GetService("TweenService")

while true do
	wait(.7)
	T:Create(script.Parent,TweenInfo.new(.5,Enum.EasingStyle.Bounce),(CFrame = script.Parent.CFrame*CFrame.Angles(0,0,math.rad(15)))):Play()
end

Thanks for your time

1 answer

It's a syntax error.

T:Create(script.Parent,TweenInfo.new(.5,Enum.EasingStyle.Bounce),(CFrame = script.Parent.CFrame*CFrame.Angles(0,0,math.rad(15)))):Play()

(CFrame =

I can't really tell what you're trying to do, but it doesn't really make any sense to put an = there. You should probably define a cframe variable using the CFrame.new() constructor elsewhere.

For the correct syntax, see: https://www.robloxdev.com/api-reference/function/TweenService/Create

3 comments

0

CFrame = is correct, not putting the CFrame.new is where its wrong

0

In general it would be a preferable practice to construct the CFrame first and simply use the variable. So long as he actually uses CFrame.new() it should work (aside from the extra parentheses), but I still recommend the same advice of defining it first rather than doing it in the middle of Create(). It would make his code more readable and easier to modify, and therefore easier to debug.

0

I see, thats a good point, i had a hard time identifying the brackets in his code since its so long

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