Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Expected <eof>, got 'end' at line 110?

The error keeps happening at line 110 which I marked (not on the real script) this is the error Expected , got 'end' whats wrong???

bolt.Size = Vector3.new(.1,.1,.1)
bolt.BrickColor = BrickColor.new("New Yeller")
bolt.CanCollide = false
bolt.Anchored = true
bolt.Material = "Neon"




local function ShootElectrode(from,too)
	local lastpos = from
	local stop = 2
	local off = 2
	local range = 100
	
	local distance = (from-too).maginute
	
	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 too = from +- (from-too).unit * step + offset
		
		local p = bolt.Clone()
		
		local DebrisFolder = workspace:FindFirstChild("DebrisFolder") or Instance.new("Folder", workspace)
		DebrisFolder.Name = "DebrisFolder"
		p.Parent = DebrisFolder
		p.Size = Vector3.new(p.Size.x,p.Size.y,(from-too).magnitude)
		p.CFrame = CFrame.new()(from:Lerp(too,0.5),too)
		
		game.Debris:AddItem(p,0.1)
		lastpos = too
	end
end



local function ContinueScale(Part)
	local Tweenservice = game:GetService("TweenService")
	local TweenInform = TweenInfo.new(
		.2,
		Enum.EasingStyle.Linear,
		Enum.EasingDirection.Out,
		0,
		false,
		0		
	)
	
	local Properties = {
		Size = Vector3.new(2.901,2.722,35)
	}
	
	local Tween = Tweenservice:Create(Part,TweenInform,Properties)
	Tween:Play()
end




Remote.OnServerEvent:Connect(function(Player,Aim,MousePos)
	
	local Character = Player.Character
	local RootPart = Character:WaitForChild("HumanoidRootPart")
	local RightHand = Character:WaitForChild("RightHand")
	local Humanoid = Character:WaitForChild("Humanoid")
	
	if Aim then
		local DebrisFolder = workspace:FindFirstChild("DebrisFolder") or Instance.new("Folder",workspace)
		DebrisFolder.Name = "DebrisFolder"
		local Animation = Instance.new("Animation")
		Animation.AnimationId = "rbxassetid://3356661429"
		local LoadAnimation = Character.Humanoid:LoadAnimation(Animation)
		LoadAnimation:Play()
		
		
		local BodPos = Instance.new("BodyPosition")
		BodPos.MaxForce = Vector3.new(5000000,5000000,5000000)
		BodPos.P = 50000
		BodPos.Position = RootPart.Position
		BodPos.Parent = RootPart
		
		spawn(function()
			wait(3)
			BodPos:Destroy()
		end)
	end
	end)
		local YCFrame = RootPart.Position.Y - Humanoid.HipHeight
		local CharParts = Character:GetChildren()
		
		math.randomseed(tick())
		spawn(function()
			for i = 1,#CharParts do
	        local Current = CharParts[i]
			end
			if Current.ClassName == "Part" or Current.ClassName == "MeshPart" then
				ShootElectrode(Vector3.new(RootPart.Position.X - math.random(-5,-5),YCFrame,RootPart.Position.Z - math.random(-5,5)), Current.Position)
				ShootElectrode(Vector3.new(RootPart.Position.X - math.random(-5,-5),YCFrame,RootPart.Position.Z - math.random(-5,5)), Current.Position)
		        wait()
		
			end
		end)
    end


    else
		
		local DebrisFolder = workspace:FindFirstChild("DebrisFolder") or Instance.new("Folder",workspace)
		DebrisFolder.Name = "DebrisFolder"
		local Hitbox = Instance.new("Part")
		Hitbox.Anchored = false
		Hitbox.Transparency = 1
		Hitbox.CanCollide = false
		Hitbox.BrickColor = BrickColor.new("Really red")
		Hitbox.Size = Vector3.new(5,5,5)
		Hitbox.Parent = DebrisFolder

2 comments

0

Btw the error is on the End

0

You probably have an extra end to one of your loops, if-statements, or functions. Look through your code.

1 answer

✓ Accepted answer

At line 110 you have an extra end, so the script thinks youre closing the if-statement.

This discussion is preserved as it was. New answers, comments, and votes are closed.