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

:87: Unexpected symbol near ')' ?

Asked by 5 years ago
Edited 5 years ago

So I'm working on making my first ever script by myself but I keep getting this error that says :87: Unexpected symbol near ')' If you know anything about this please tell me how to fix it.

local plr = game.Players.StarzoZero
local char = plr.Character
local larm = char("Left Arm")
local rarm = char("Right Arm")
local lleg = char("Left Leg")
local rleg = char("Right Leg")
local torso = char("Torso")
local hed = char("Head")


BTAUNT = Instance.new("Sound", hed)
BTAUNT.SoundId = "rbxassetid://2819121992"
BTAUNT.Volume = 2
BTAUNT.Pitch = 1
BTAUNT.Looped = true
BTAUNT.TimePosition = 0
BTAUNT:Play()

hed.face.Texture = "rbxassetid://0"

local naeeym2 = Instance.new("BillboardGui",char)
naeeym2.AlwaysOnTop = true
naeeym2.Size = UDim2.new(5,35,2,35)
naeeym2.StudsOffset = Vector3.new(0,2,0)
naeeym2.Adornee = hed
naeeym2.Name = "Name"

local tecks2 = Instance.new("TextLabel",naeeym2)
tecks2.BackgroundTransparency = 1
tecks2.TextScaled = true
tecks2.BorderSizePixel = 0
tecks2.Text = "man"
tecks2.Font = "Fantasy"
tecks2.TextSize = 50
tecks2.TextStrokeTransparency = 0
tecks2.TextColor3 = BrickColor.new('Really black').Color
tecks2.TextStrokeColor3 = BrickColor.new('Really red').Color
tecks2.Size = UDim2.new(1,0,0.5,0)
tecks2.Parent = naeeym2
textfag = tecks2
tecks2.Text = "man"


for i,v in pairs(char:GetChildren()) do
    if v.ClassName == "Hat" or v.ClassName == "Accessory" or v.ClassName == "Shirt" or v.ClassName == "Pants" or v.ClassName == "Face" then
        v:Destroy()
    end
end
mouse.KeyDown:connect(function(key)
    if attack == false then
        if key == "e" then
            lleg.Transparency = 1
            rleg.Transparency = 1
            hed.Transparency = 0
            torso.Transprency = 1
            larm.Transparency = 1
            rarm.Transparency = 1
            tecks2.Text = "head"
        end
        if key == "q" then
            lleg.Transparency = 0
            rleg.Transparency = 0
            hed.Transparency = 1
            torso.Transprency = 1
            larm.Transparency = 1
            rarm.Transparency = 1
            tecks2.Text = "legs"
        end
        if key == "r" then
            lleg.Transparency = 1
            rleg.Transparency = 1
            hed.Transparency = 1
            torso.Transprency = 0
            larm.Transparency = 1
            rarm.Transparency = 1
            tecks2.Text = "torso"
        end
        if key == "t" then
            lleg.Transparency = 1
            rleg.Transparency = 1
            hed.Transparency = 1
            torso.Transprency = 1
            larm.Transparency = 0
            rarm.Transparency = 0
            tecks2.Text = "arms"
        end
end)    
0
Hello, can you please edit the question then put the script inside a code block CjayPlyz 643 — 5y
0
you should add one more "end" keyword before the last "end" keyword to close off the "if statement" User#23252 26 — 5y
0
ok i will try that thanks StarzoZero -5 — 5y
0
you can aslo check the answer i just posted User#23252 26 — 5y
View all comments (2 more)
0
You are missing an "end" before the last one, add it starmaq 1290 — 5y
0
obama is a badass black jew CosmicguyTinyWeenous -52 — 5y

1 answer

Log in to vote
1
Answered by 5 years ago

you just need the "end" keyword to end the 'if statement'!

local plr = game.Players.StarzoZero
local char = plr.Character
local larm = char("Left Arm")
local rarm = char("Right Arm")
local lleg = char("Left Leg")
local rleg = char("Right Leg")
local torso = char("Torso")
local hed = char("Head")


BTAUNT = Instance.new("Sound", hed)
BTAUNT.SoundId = "rbxassetid://2819121992"
BTAUNT.Volume = 2
BTAUNT.Pitch = 1
BTAUNT.Looped = true
BTAUNT.TimePosition = 0
BTAUNT:Play()

hed.face.Texture = "rbxassetid://0"

local naeeym2 = Instance.new("BillboardGui",char)
naeeym2.AlwaysOnTop = true
naeeym2.Size = UDim2.new(5,35,2,35)
naeeym2.StudsOffset = Vector3.new(0,2,0)
naeeym2.Adornee = hed
naeeym2.Name = "Name"

local tecks2 = Instance.new("TextLabel",naeeym2)
tecks2.BackgroundTransparency = 1
tecks2.TextScaled = true
tecks2.BorderSizePixel = 0
tecks2.Text = "man"
tecks2.Font = "Fantasy"
tecks2.TextSize = 50
tecks2.TextStrokeTransparency = 0
tecks2.TextColor3 = BrickColor.new('Really black').Color
tecks2.TextStrokeColor3 = BrickColor.new('Really red').Color
tecks2.Size = UDim2.new(1,0,0.5,0)
tecks2.Parent = naeeym2
textfag = tecks2
tecks2.Text = "man"


for i,v in pairs(char:GetChildren()) do
    if v.ClassName == "Hat" or v.ClassName == "Accessory" or v.ClassName == "Shirt" or v.ClassName == "Pants" or v.ClassName == "Face" then
        v:Destroy()
    end
end
mouse.KeyDown:connect(function(key)
    if attack == false then
        if key == "e" then
            lleg.Transparency = 1
            rleg.Transparency = 1
            hed.Transparency = 0
            torso.Transprency = 1
            larm.Transparency = 1
            rarm.Transparency = 1
            tecks2.Text = "head"
        end
        if key == "q" then
            lleg.Transparency = 0
            rleg.Transparency = 0
            hed.Transparency = 1
            torso.Transprency = 1
            larm.Transparency = 1
            rarm.Transparency = 1
            tecks2.Text = "legs"
        end
        if key == "r" then
            lleg.Transparency = 1
            rleg.Transparency = 1
            hed.Transparency = 1
            torso.Transprency = 0
            larm.Transparency = 1
            rarm.Transparency = 1
            tecks2.Text = "torso"
        end
        if key == "t" then
            lleg.Transparency = 1
            rleg.Transparency = 1
            hed.Transparency = 1
            torso.Transprency = 1
            larm.Transparency = 0
            rarm.Transparency = 0
            tecks2.Text = "arms"
        end
    end
end)
1
wow.. you actually went through all of that XD CjayPlyz 643 — 5y
Ad

Answer this question