Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Don't know how to fix what output gave me? [CLOSE THIS PLS]

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' I'm making a transformation script 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

--//Variables
hatsRemoved = false
local rp = game:GetService("ReplicatedStorage")
local ssjHair = rp:WaitForChild("SSJ1").SSJ
local ssjParticles = rp:WaitForChild("SSJ1").SSJparticles
--local camScript = script.camScript
--//Instances
local anim = Instance.new("Animation")
anim.AnimationId = "http://www.roblox.com/Asset?ID=1226733054"
animTrack = nil
local offanim = Instance.new("Animation")
offanim.AnimationId = "http://www.roblox.com/Asset?ID=1226813026"
--//Events
--local ssjEvent = rp:WaitForChild("SSJEvent")
--local offEvent = rp:WaitForChild("SSJOffEvent")
local ssjEvent = Instance.new("RemoteEvent", rp)
ssjEvent.Name = "SSJEvent"

--//Make rocks fly up with an animation facing up and not so loud ahhhhh sound
--//Thunder sounds

local function ssjFired(plr)
print("Event recieved")
local char = game.Workspace:FindFirstChild(plr.Name)
local lightningValues = {
    -- 1
    {
    Name = "EndPoint";
    Parent = game.Workspace.partChooserEnd;
    CFrame = char.RightFoot.CFrame + Vector3.new(-1, 0 , 0);
    };
    -- 2
    {
    Name = "StartPoint";
    Parent = game.Workspace.partChooserStart;
    CFrame = char.Head.CFrame + Vector3.new(0, 100, 0);
    CFrame2 = CFrame.new(lightningp2.Position, Vector3.new(0,90,0))
    };
    -- 3
    {
    Name = "EndPoint2";
    Parent = game.Workspace.partChooserEnd;
    CFrame = char.RightFoot.CFrame + Vector3.new(-3, 1 , 0)
    };
    -- 4
    {
    Name = "StartPoint2";
    Parent = game.Workspace.partChooserStart;
    CFrame = char.Head.CFrame + Vector3.new(2, 100, 0);
    CFrame2 = CFrame.new(lightningp2.Position, Vector3.new(0,90,0))
    };
    -- 5
    {
    Name = "EndPoint3";
    Parent = game.Workspace.partChooserEnd;
    CFrame = char.RightFoot.CFrame + Vector3.new(5, 1 , 0)
    };
    -- 6
    {
    Name = "StartPoint3";
    Parent = game.Workspace.partChooserStart;
    CFrame = char.Head.CFrame + Vector3.new(-4, 100, 0);
    CFrame2 = CFrame.new(lightningp2.Position, Vector3.new(0,90,0))
    };
};
local namee = plr.Name
local urFolder = rp:WaitForChild(namee)
local ssjE = urFolder:FindFirstChild("SSJenabled")
local plrNameValue = script.plrName
plrNameValue.Value = namee
    local ssjFound = rp:WaitForChild(namee)
    local SSJenabled = ssjFound:FindFirstChild("Value")
    char.Humanoid.Health = math.huge
    char.Humanoid.WalkSpeed = 0
    char.Humanoid.JumpPower = 0
    wait()
    animTrack = plr.Character.Humanoid:LoadAnimation(anim)
    animTrack:Play()
    --  camScript.Disabled = false
    wait()
    for i = 1,#lightningValues do
        local part = Instance.new("Part")
        part.Name = lightningValues[i].Name
        part.Parent = lightningValues[i].Parent
        part.CFrame = lightningValues[i].CFrame
        if lightningValues[i].CFrame2 then
            part.CFrame = lightningValues[i].CFrame2
        end
        part.Anchored = true
        part.Locked = true
        part.CanCollide = false
        part.Transparency = 1
        part.Size = Vector3.new(1,1,1)
    end
    local bolt = Instance.new("Part")
    bolt.Name = "LightningBolt"
    bolt.BrickColor = BrickColor.new(255, 255, 0)
    bolt.Material = "Neon"
    bolt.FormFactor = "Custom"
    bolt.CanCollide = false
    bolt.Anchored = true
    bolt.Size = Vector3.new(1, 1, 1)
    local p = Instance.new("Part")
    p.Parent = char
    p.Anchored = true
    p.CanCollide = false
    p.Transparency = 0
    p.formFactor = "Symmetric"
    p.Size = Vector3.new(0, 0, 0)
    p.TopSurface = "Smooth"
    p.BottomSurface = "Smooth"
    p.Name = "Sharingan"
    p.Shape = "Ball"
    p.Material = "Neon"
    p.CFrame = char.UpperTorso.CFrame
    p.BrickColor = BrickColor.new("New Yeller")

        function shootElectrode(from, to)
            local lastPos = from
            local step = 16
            local off = 32
            --local range = 500

            local distance = (from-to).magnitude
            --if distance > range then distance = range end
            for i = 0,distance, step do
                local from = lastPos

                local offset = Vector3.new(
                    math.random(-off,off),
                    math.random(-off,off),
                    math.random(-off,off)
                )/10

                local to = from + -(from-to).unit*step + offset

                local p = bolt:Clone()
                p.Parent = game.Workspace.ExtraParts
                p.Size = Vector3.new(p.Size.X, p.Size.Y, (from-to).magnitude)
                p.CFrame = CFrame.new( from:Lerp(to,.5) , to  )
                game.Debris:AddItem(p,.3)
                lastPos = to
                wait()
            end
        end
            for i = 1,7 do
                wait(0.05)
                p.Size = p.Size + Vector3.new(4, 4, 4)
                p.Transparency = p.Transparency + 0.2
                p.CFrame = char.UpperTorso.CFrame
            end 
            p.Size = Vector3.new(24, 24, 24)
            p.Transparency = 0
        local growingS = script.growingScript
        growingS.Disabled = false
            for l = 1,10 do
                wait()
                local partChooser = workspace.partChooserStart
                local partChooser2 = workspace.partChooserEnd
                local random1 = partChooser:children()[math.random(1,#partChooser:children())]
                local random2 = partChooser2:children()[math.random(1,#partChooser2:children())]
            --  print(random1.Name)
            --  print(random2.Name)
                local from = random1.Position
                local to = random2.Position

                shootElectrode(from, to)

                local partChooser = workspace.partChooserStart
                local partChooser2 = workspace.partChooserEnd
                local random1 = partChooser:children()[math.random(1,#partChooser:children())]
                local random2 = partChooser2:children()[math.random(1,#partChooser2:children())]
            --  print(random1.Name)
            --  print(random2.Name)
                local from = random1.Position
                local to = random2.Position

                shootElectrode(from, to)
        end
end

ssjEvent.OnServerEvent:connect(ssjFired)


0
at line 31 does that part need ";" at the end? "partChooserStart;" Paldi 109 — 7y
1
I tried that but it didn't work but then when i read what you said again I noticed that i could do that if I just edit the script a little bit, thanks. Godlydeathdragon 227 — 7y

Answer this question