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)
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)