I can't identify this error on the end of the function?(ANSWERED)
Asked by
4 years ago Edited 4 years ago
I'll put my full script for context, but the place it gives me an error is on the block about the on button. (line 58) Here is my error:
08:59:35.582 - ServerScriptService.MicrowaveScript:58: Expected identifier when parsing expression, got ')'
01 | local onButton = game.Workspace.Microwave.Buttons.OnButton |
02 | local offButton = game.Workspace.Microwave.Buttons.OffButton |
03 | local openButton = game.Workspace.Microwave.Buttons.OpenButton |
04 | local closeButton = game.Workspace.Microwave.Buttons.CloseButton |
05 | local door = game.Workspace.Microwave.TweeningDoor |
06 | local wheel = game.Workspace.Microwave.LazySusan |
07 | local base = game.Workspace.Microwave.Base |
08 | local motor = base.MicrowaveMotor |
09 | local light = game.Workspace.Microwave.Light |
11 | local microwaveOn = false |
12 | local tweenCooldown = false |
14 | local TweenService = game:GetService( "TweenService" ) |
15 | local Info = TweenInfo.new( |
17 | Enum.EasingStyle.Sine, |
18 | Enum.EasingDirection.Out, |
24 | Position = Vector 3. new(- 49.623 , 8.5 , 5.443 ); |
25 | Orientation = Vector 3. new( 0 , - 15 , 0 ); |
27 | local openDoorTween = TweenService:Create(door, Info, tweenGoals) |
29 | local Info 2 = TweenInfo.new( |
31 | Enum.EasingStyle.Sine, |
32 | Enum.EasingDirection.Out, |
38 | Position = Vector 3. new(- 43 , 8.5 , 15.5 ); |
39 | Orientation = Vector 3. new( 0 , 90 , 0 ); |
41 | local closeDoorTween = TweenService:Create(door, Info 2 , tweenGoals 2 ) |
45 | openButton.ClickDetector.MouseClick:Connect( function () |
46 | if doorOpen = = true then |
48 | else if tweenCooldown = = true then |
50 | else if microwaveOn = = false then |
60 | closeButton.ClickDetector.MouseClick:Connect( function () |
61 | if doorOpen = = false then |
63 | else if tweenCooldown = = true then |
75 | onButton.ClickDetector.MouseClick:Connect( function () |
76 | if doorOpen = true then |
79 | light.PointLight.Enabled = true |
80 | motor.AngularVelocity = 0.5 |
84 | onButton.ClickDetector.MouseClick:Connect( function () |
85 | light.PointLight.Enabled = false |
86 | motor.AngularVelocity = 0 |