You cannot Instance this class with Instance.new()

Functions

PushToClient(string username, string eventName, ...)

This function can only be called by the server.
This function is used to send data from server to client. You can send unlimited parameters after desired first 2 parameters. An example:

local RemoteEventService = Game:GetService("RemoteEventService")
local error = RemoteEventService:PushToClient("Cubern", "Event1", "hello!", Map.Cube, 22233)
if error == nil then
    printl("It is a success!")
else
    printl("It failed! The error is: " .. error)
end

PushToAllClients(string eventName, ...)

This function can only be called by the server.
This function is used to send data from server to all connected clients. You can send unlimited parameters after desired first parameter. An example:

local RemoteEventService = Game:GetService("RemoteEventService")
local error = RemoteEventService:PushToAllClients("Event1", "Starting minigame!")
if error == nil then
    printl("It is a success!")
else
    printl("It failed! The error is: " .. error)
end

SendEventToServer(string eventName, ...)

This function can only be called by the client.
This function is used by the client to send a event to the server. An example:

ConnectEvent(string eventName, ...)

This function can be called by both the client and the server.
This function is used to register a connection that when a event by the value of eventName is fired by the server or the client: the connected function will be called. An example:

local RemoteEventService = Game:GetService("RemoteEventService")
RemoteEventService:ConnectEvent("Event1", __SCRIPT__, "FunctionCall") -- since we had registered the event by name of "Event1" we will use "Event1" as first paramter
-- Same way can be used for the server
function FunctionToCall(data)
    printl(data.CastleName)
end