Unexpected Unicode character: U+2028. Did you mean ' '?

local g = game
local rs = g:GetService("ReplicatedStorage")
local ss = g:GetService("ServerStorage")
local RaidFunction = rs:WaitForChild("StartRaid")
local SpawnEvent = rs:WaitForChild("SpawnRobot")

SpawnEvent.OnServerEvent:Connect(function(player)
	local c = ss:FindFirstChild("Insane Robot"):Clone()
	c.Parent = workspace
    c.HumanoidRootPart.CFrame = player.Character.HumanoidRootPart.CFrame
end

This is my code, and it keeps running in this error

1 Like

Well, it seems you’re missing a ‘)’ at the end at the bottom of your code, so maybe that’s contributing.

Already has it fixed, it didn’t put the ‘)’ at the end due to this symbol I think

When I try to start a new line after

SpawnEvent.OnServerEvent:Connect(function(player)

The ‘end)’ doesn’t appear

This is already an issue and has been posted as a bug report here.

https://devforum.roblox.com/t/pressing-shift-enter-in-the-script-editor-will-create-an-invalid-unicode-character/620339/3

1 Like

And also,

local g = game
local rs = g:GetService("ReplicatedStorage")
local ss = g:GetService("ServerStorage")
local RaidFunction = rs:WaitForChild("StartRaid")
local SpawnEvent = rs:WaitForChild("SpawnRobot")

this piece of code alone tells me "Excepted , got ‘end’
EDIT:
Does this mean the character is somewhere here?
EDIT: No, it’s not the issue, even empty script tells it.

Currently happening to me as well.

1 Like