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

Unexpected Unicode character: U+2028?

local event = game.ReplicatedStorage.tooodsPet:WaitForChild("PetEvent")
local InvEvent = game.ReplicatedStorage.tooodsPet:WaitForChild("RemoveEvent")
local equipped = game.Players.LocalPlayer:WaitForChild("stats").PetEquip

script.Parent.MouseButton1Click:Connect(function()
	if not equipped then
		event:FireServer(game.Players.LocalPlayer)
		equipped = true
	else
		InvEvent:FireServer(game.Players.LocalPlayer)
		equipped = false
	end
end)

It gives an Unexpected Unicode character: U+2028. Did you mean ' '? My keyboard is a US keyboard, so I don't know what is wrong

1 comment

0

Delete line that this error is on, and rewrite it. sometimes happens

1 answer

✓ Accepted answer

I get this a lot. Just rewrite the code and it should be good.

1 comment

0

Rather than that just copy the entire script and paste it back in place, works every time. This is helpful for if you don't know what line the error is on.

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