Don't know how to fix what output gave me?
Asked by
7 years ago Edited 7 years ago
Output: 12:05:05.820 - ServerScriptService.SSJScript:31: '}' expected (to close '{' at line 29) near 'Parent'
game is filtering enabled this is a script in serverscriptservice that recieves the event when a localscript in startercharacterscripts fires it.
left out most of it so it won't get leaked only left part that needed fixing
THIS SCRIPT ISNT THE SCRIPT I STARTED WITH WHEN I MADE THIS QUESTION
003 | local rp = game:GetService( "ReplicatedStorage" ) |
004 | local ssjHair = rp:WaitForChild( "SSJ1" ).SSJ |
005 | local ssjParticles = rp:WaitForChild( "SSJ1" ).SSJparticles |
008 | local anim = Instance.new( "Animation" ) |
011 | local offanim = Instance.new( "Animation" ) |
016 | local ssjEvent = Instance.new( "RemoteEvent" , rp) |
017 | ssjEvent.Name = "SSJEvent" |
021 | local lightningValues = { |
025 | Parent = game.Workspace.partChooserEnd; |
026 | CFrame = char.RightFoot.CFrame + Vector 3. new(- 1 , 0 , 0 ); |
031 | Parent = game.Workspace.partChooserStart |
032 | CFrame = char.Head.CFrame + Vector 3. new( 0 , 100 , 0 ) |
033 | CFrame 2 = CFrame.new(lightningp 2. Position, Vector 3. new( 0 , 90 , 0 )) |
038 | Parent = game.Workspace.partChooserEnd |
039 | CFrame = char.RightFoot.CFrame + Vector 3. new(- 3 , 1 , 0 ) |
044 | Parent = game.Workspace.partChooserStart |
045 | CFrame = char.Head.CFrame + Vector 3. new( 2 , 100 , 0 ) |
046 | CFrame 2 = CFrame.new(lightningp 2. Position, Vector 3. new( 0 , 90 , 0 )) |
051 | Parent = game.Workspace.partChooserEnd |
052 | CFrame = char.RightFoot.CFrame + Vector 3. new( 5 , 1 , 0 ) |
057 | Parent = game.Workspace.partChooserStart |
058 | CFrame = char.Head.CFrame + Vector 3. new(- 4 , 100 , 0 ) |
059 | CFrame 2 = CFrame.new(lightningp 2. Position, Vector 3. new( 0 , 90 , 0 )) |
075 | local function ssjFired(plr) |
076 | print ( "Event recieved" ) |
077 | local char = game.Workspace:FindFirstChild(plr.Name) |
078 | local namee = plr.Name |
079 | local urFolder = rp:WaitForChild(namee) |
080 | local ssjE = urFolder:FindFirstChild( "SSJenabled" ) |
081 | local plrNameValue = script.plrName |
082 | plrNameValue.Value = namee |
083 | local ssjFound = rp:WaitForChild(namee) |
084 | local SSJenabled = ssjFound:FindFirstChild( "Value" ) |
085 | char.Humanoid.Health = math.huge |
086 | char.Humanoid.WalkSpeed = 0 |
087 | char.Humanoid.JumpPower = 0 |
089 | animTrack = plr.Character.Humanoid:LoadAnimation(anim) |
093 | for i = 1 ,#lightningValues do |
094 | local part = Instance.new( "Part" ) |
095 | part.Name = lightningValues [ i ] .Name |
096 | part.Parent = lightningValues [ i ] .Parent |
097 | part.CFrame = lightningValues [ i ] .CFrame |
098 | if lightningValues [ i ] .CFrame 2 then |
099 | part.CFrame = lightningValues [ i ] .CFrame 2 |
103 | part.CanCollide = false |
104 | part.Transparency = 1 |
105 | part.Size = Vector 3. new( 1 , 1 , 1 ) |
107 | local bolt = Instance.new( "Part" ) |
108 | bolt.Name = "LightningBolt" |
109 | bolt.BrickColor = BrickColor.new( 255 , 255 , 0 ) |
110 | bolt.Material = "Neon" |
111 | bolt.FormFactor = "Custom" |
112 | bolt.CanCollide = false |
114 | bolt.Size = Vector 3. new( 1 , 1 , 1 ) |
115 | local p = Instance.new( "Part" ) |
120 | p.formFactor = "Symmetric" |
121 | p.Size = Vector 3. new( 0 , 0 , 0 ) |
122 | p.TopSurface = "Smooth" |
123 | p.BottomSurface = "Smooth" |
127 | p.CFrame = char.UpperTorso.CFrame |
128 | p.BrickColor = BrickColor.new( "New Yeller" ) |
130 | function shootElectrode(from, to) |
136 | local distance = (from-to).magnitude |
138 | for i = 0 ,distance, step do |
141 | local offset = Vector 3. new( |
142 | math.random(-off,off), |
143 | math.random(-off,off), |
144 | math.random(-off,off) |
147 | local to = from + -(from-to).unit*step + offset |
149 | local p = bolt:Clone() |
150 | p.Parent = game.Workspace.ExtraParts |
151 | p.Size = Vector 3. new(p.Size.X, p.Size.Y, (from-to).magnitude) |
152 | p.CFrame = CFrame.new( from:Lerp(to,. 5 ) , to ) |
153 | game.Debris:AddItem(p,. 3 ) |
160 | p.Size = p.Size + Vector 3. new( 4 , 4 , 4 ) |
161 | p.Transparency = p.Transparency + 0.2 |
162 | p.CFrame = char.UpperTorso.CFrame |
164 | p.Size = Vector 3. new( 24 , 24 , 24 ) |
166 | local growingS = script.growingScript |
167 | growingS.Disabled = false |
170 | local partChooser = workspace.partChooserStart |
171 | local partChooser 2 = workspace.partChooserEnd |
172 | local random 1 = partChooser:children() [ math.random( 1 ,#partChooser:children()) ] |
173 | local random 2 = partChooser 2 :children() [ math.random( 1 ,#partChooser 2 :children()) ] |
176 | local from = random 1. Position |
177 | local to = random 2. Position |
179 | shootElectrode(from, to) |
181 | local partChooser = workspace.partChooserStart |
182 | local partChooser 2 = workspace.partChooserEnd |
183 | local random 1 = partChooser:children() [ math.random( 1 ,#partChooser:children()) ] |
184 | local random 2 = partChooser 2 :children() [ math.random( 1 ,#partChooser 2 :children()) ] |
187 | local from = random 1. Position |
188 | local to = random 2. Position |
190 | shootElectrode(from, to) |
194 | ssjEvent.OnServerEvent:connect(ssjFired) |