Unexpected Unicode Character U + 2028

How do I get rid of this error

I’m not sure how I can fix it, my keyboard is at this and when I click on the error in the output i get another return contents

image

local contents = {}

contents["Crates"] = 25

function contents:GetItemTypes()
	local itemTypes = { 
		{
			Rarity = {Name = "Common", Chance = 0.589, Color = Color3.fromRGB(0, 85, 127)}; 
			Items = {
				{Name = "Item1", ImageId = nil};
				{Name = "Item2", ImageId = nil};
			} 
		};
		
		
		{
			Rarity = {Name = "Uncommon", Chance = 0.300, Color3.fromRGB(43, 125, 43)};
			Items = {
				{Name = 'Item3', ImageId = nil};
				{Name = 'Item4', ImageId = nil};
				
			};
		};
		
		{
			Rarity = {Name = "Rare", Chance = 0.100, Color3.fromRGB(210, 85, 0)};
			Items = { 
				{Name = "Item5", ImageId = nil};
				{Name = "Item6", ImageId = nil}
			};
		}; 
		{ 
			Rarity = {Name = "Legendary", Chance = 0.011, Color.fromRGB(170, 0, 0 )};
			Items = {
				{Name = "Item7", ImageId = nil}
			}
		};
	}
	
	for groupIndex, group in pairs(itemTypes) do 
		for i, item in pairs(group.Items) do 
			item.Groupindex = groupIndex 
		end
	end
	
	return itemTypes 
end


return contents 

This is a relatively new error that happens when you do Shift+Enter. It creates a character that looks like new line, but isn’t treated as white space the roblox compiler, which causes an error. Look for any lines without a line number next to it.

1 Like

image

like this?

1 Like

U+2028 (Line Separator) is a very annoying unicode character because you can’t see it in your text.

You can see it in the script editor though, there will be a break in the line where it is, it looks something like this:
image
All you have to do is select everything on that blank line and backspace it until it disappears.

1 Like