Expected identifier, got 'local'

How do I fix this? This is the code:

local core = workspace.Core

local innerCore = core.ReactorCore
local effects = innerCore.Effects.Attachment
local effect1 = effects.e1
local effect2 = effects.e2
local effect3 = effects.e3
local core2 = innerCore.Core2

local laser1 = core.MainLaser1
local beam1 = laser1.Extra.mid
local beam2 = laser1.Laser1.e
local beam3 = laser1.Laser2.e

local laser2 = core.MainLaser2
local beam4 = laser2.Extra.mid
local beam5 = laser2.Laser1.e
local beam6 = laser2.Laser2.e

local laser3 = core.MainLaser3
local beam7 = laser3.Extra.mid
local beam8 = laser3.Laser1.e
local beam9 = laser3.Laser2.e

local laser4 = core.MainLaser4
local beam10 = laser4.Extra.mid
local beam11 = laser4.Laser1.e
local beam12 = laser4.Laser2.

function activation()
	script.Parent.Music:Play()
	effect1.Enabled = true
	effect2.Enabled = true
	effect3.Enabled = true
	core2.Transparency = 0
	beam1.Transparency = 0
	beam2.Transparency = 0
	beam3.Transparency = 0
	beam4.Transparency = 0
	beam5.Transparency = 0
	beam6.Transparency = 0
	beam7.Transparency = 0
	beam8.Transparency = 0
	beam9.Transparency = 0
	beam10.Transparency = 0
	beam11.Transparency = 0
	beam12.Transparency = 0
end

script.Parent.ClickDetector.MouseClick:Connect(activation)
2 Likes

What line is the error at? Can’t see any error with this

edit: you forgot something at the end at this line:

local beam12 = laser4.Laser2.

Here’s the full error:

Workspace.Core Startup.Button.Script:30: Expected identifier, got 'local'

Thanks. That was the whole error lol.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.