Skip to main content

NeoNet

Based off of 'Net' by sleitnick with added features similar to other networking modules.

Types

RemoteSetupInfo

type RemoteSetupInfo = {
RemoteEvents{string},
RemoteFunctions{string},
RemoteValues{stringany},
}

The information that should be sent into NeoNet:Setup

RemoteClientMiddleware

type RemoteClientMiddleware = (
Parameters{numberany},
) → (
boolean,
{numberany}
)

Type for client middleware. See how to create your own middleware here.

RemoteServerMiddleware

type RemoteServerMiddleware = (
PlayerPlayer,
Parameters{numberany}
) → (
boolean,
{numberany}
)

Type for server middleware. See how to create your own middleware here.

Properties

Middleware

NeoNet.Middleware: {numberModuleScript}

For access to the built-in middleware that comes with NeoNet such as RateLimiter and TypeChecker.

Functions

UseParent

NeoNet:UseParent(parentInstance) → ()

This method is only intended to be used for combining with/adapting to other systems or to organize your remotes in a more accessible place.

caution

It will make NeoNet unable to access remotes created without calling UseParent with the same Parent in the other scripts.

NeoNet:UseParent(ReplicatedStorage.Remotes)
local remoteEvent = NeoNet:RemoteEvent("PointsChanged")

RemoteEvent

NeoNet:RemoteEvent(namestring) → RemoteEvent

Gets a RemoteEvent with the given name. On the server, if the RemoteEvent does not exist, then it will be created with the given name. On the client, if the RemoteEvent does not exist, then it will wait until it exists for at least 10 seconds. If the RemoteEvent does not exist after 10 seconds, an error will be thrown.

local remoteEvent = NeoNet:RemoteEvent("PointsChanged")

RemoteFunction

NeoNet:RemoteFunction(namestring) → RemoteFunction

Gets a RemoteFunction with the given name. On the server, if the RemoteFunction does not exist, then it will be created with the given name. On the client, if the RemoteFunction does not exist, then it will wait until it exists for at least 10 seconds. If the RemoteFunction does not exist after 10 seconds, an error will be thrown.

local remoteFunction = NeoNet:RemoteFunction("GetPoints")

RemoteValue

NeoNet:RemoteValue(
namestring,
valueT
) → {
EventRemoteEvent,
Readyboolean,
Valueany,
Specific{}?,
_connectionRBXScriptConnection
}

Gets a RemoteValue with the given name. On the server, if the RemoteValue does not exist, then it will be created with the given name. On the client, if the RemoteValue does not exist, then it will wait until it exists for at least 10 seconds. If the RemoteValue does not exist after 10 seconds, an error will be thrown.

local remoteValue = NeoNet:RemoteValue("ButtonClicks")

GetValue

NeoNet:GetValue(namestring) → any

Gets the current value of a RemoteValue.

print(NeoNet:GetValue("ButtonClicks"), "Clicks")

Fire

NeoNet:Fire(
namestring,
...any
) → ()

Fires the given RemoteEvent. Will Fire to all clients if used from the server

NeoNet:Fire("SomeEvent", someParameters, middleware?)
tip

If the last parameter is a function then it will use that as middleware

Listen

NeoNet:Listen(
namestring,
) → () → (
number,
...any
)

Returns an iterator for use in a loop or ECS context. Arguments are iterated through from oldest to newest.

caution

Breaking the loop MAY drop all arguments gathered at that moment since it clears the storage every time NeoNet:Listen is called.

Middleware also doesn't work yet.

game:GetService("RunService").Heartbeat:Connect(function()
    for index: number, arg1, arg2 in NeoNet:Listen("DropItem") do
        --drop the item or whatever
    end
end)

ConnectOnce

NeoNet:ConnectOnce(
namestring,
handler(...any) → nil,
) → ()

Connects a handler function to the given RemoteEvent and disconnects after the first event.

caution

If the middleware drops the request it will still be disconnected, use NeoNet:ConnectUntil if you want to only disconnect after middleware passes an event.

NeoNet:ConnectOnce("SomeEvent", function(...) end)

ConnectUntil

NeoNet:ConnectUntil(
namestring,
handler(...any) → nil,
) → ()

Connects a handler function to the given RemoteEvent and disconnects after the first event that passes the middleware. (Similar to :ConnectOnce but it only disconnects after the middleware has continued a request.)

NeoNet:ConnectUntil("SomeEvent", function(...) end, someMiddleware)

Setup

This item only works when running on the server. Server
NeoNet:Setup(infoRemoteSetupInfo) → ()
caution

deprecated (as of v1.2.0) or something please don't use; this type of setup was exactly what I wanted to avoid with NeoNet

Sets up all the defined RemoteEvents, RemoteFunctions, and RemoteValues.

NeoNet:Setup {
    RemoteEvents = {
        "ClickRequest"
    },
    RemoteValues = {
        ButtonClicks = 0
    }
}

FireFor

This item only works when running on the server. Server
NeoNet:FireFor(
namestring,
playerPlayer,
...any
) → ()

Fires the given RemoteEvent to the specified player.

NeoNet:FireFor("SomeEvent", somePlayer, someParameters, middleware?)

FireExcept

This item only works when running on the server. Server
NeoNet:FireExcept(
namestring,
playerPlayer,
...any
) → ()

Fires the given RemoteEvent to all players except the specified player.

NeoNet:FireExcept("SomeEvent", somePlayer, someParameters, middleware?)

FireList

This item only works when running on the server. Server
NeoNet:FireList(
namestring,
players{Player},
...any
) → ()

Fires the given RemoteEvent to all specified players.

NeoNet:FireList("SomeEvent", {somePlayer1, somePlayer2}, someParameters, middleware?)
caution

Uses RemoteClientMiddleware for now due to uncertainty around how to handle a list of players for middleware.

Connect

NeoNet:Connect(
namestring,
handler(...any) → nil,
) → RBXScriptConnection

Connects a handler function to the given RemoteEvent. (Server & Client)

-- Client
NeoNet:Connect("PointsChanged", function(points)
    print("Points", points)
end)
-- Server
NeoNet:Connect("SomeEvent", function(player, ...) end)

Handle

This item only works when running on the server. Server
NeoNet:Handle(
namestring,
handler(
playerPlayer,
...any
) → ...any,
) → ()

Sets the invocation function for the given RemoteFunction.

NeoNet:Handle("GetPoints", function(player)
    return 10
end)

SetValue

This item only works when running on the server. Server
NeoNet:SetValue(
namestring,
valueany
) → ()

Sets the value for the given RemoteValue.

caution

This will completely ignore player-specific values and change the top value.

NeoNet:SetValue("ButtonClicks", 0)

SetTop

This item only works when running on the server. Server
NeoNet:SetTop(
namestring,
valueany
) → ()

Sets the top value for the given RemoteValue.

NeoNet:SetValue("ButtonClicks", 0)

SetFor

This item only works when running on the server. Server
NeoNet:SetFor(
namestring,
playerPlayer,
valueany
) → ()

Sets the player-specific value for the given RemoteValue.

NeoNet:Setfor("Role", SomePlayer, "Monster")

SetList

This item only works when running on the server. Server
NeoNet:SetList(
namestring,
players{Player},
valueany
) → ()

Sets the player-specific value for the given set of players, for the given RemoteValue.

NeoNet:SetList("Role", SomePlayers, "Survivors")

ClearValues

This item only works when running on the server. Server
NeoNet:ClearValues(namestring) → ()

Removes all player-specific values for the given RemoteValue.

NeoNet:ClearValues("Role") --maybe the game ended in this example

ClearValueFor

This item only works when running on the server. Server
NeoNet:ClearValueFor(
namestring,
playerPlayer
) → ()

Removes the player-specific value for the given RemoteValue.

NeoNet:ClearValueFor("Role", SomePlayer) --maybe a survivor died so we remove their role

ClearValuesList

This item only works when running on the server. Server
NeoNet:ClearValuesList(
namestring,
players{Player}
) → ()

Removes the player-specific value for the given set of players, for the given RemoteValue.

NeoNet:ClearValuesList("Role", SomePlayer) --no idea what the example could be here

GetFor

This item only works when running on the server. Server
NeoNet:GetFor(
namestring,
playerPlayer
) → any

Gets the player-specific value for the given RemoteValue. If there is no player-specific value, the top value will be returned.

local role = NeoNet:GetFor("Role", SomePlayer)

Clean

This item only works when running on the server. Server
NeoNet:Clean() → ()

Destroys all remotes. This should really only be used in testing environments and not during runtime.

Observe

This item only works when running on the client. Client
NeoNet:Observe(
namestring,
handler(any),
) → ()

Connects a function to the given RemoteValue, which will be called each time the value changes + when initially observed.

NeoNet:Observe("ButtonClicks", function(newValue)
    print(tostring(newValue) .. " Clicks")
end)

Invoke

This item only works when running on the client. Client
NeoNet:Invoke(
namestring,
...any
) → ...any

Invokes the RemoteFunction with the given arguments.

local points = NeoNet:Invoke("GetPoints")

IsValueReady

This item only works when running on the client. Client
NeoNet:IsValueReady(namestring) → boolean

Invokes the RemoteFunction with the given arguments.

local points = NeoNet:Invoke("GetPoints")
Show raw api
{
    "functions": [
        {
            "name": "UseParent",
            "desc": "This method is only intended to be used for combining with/adapting to other systems or to organize your remotes in a more accessible place.\n:::caution\nIt will make NeoNet unable to access remotes created without calling UseParent with the same Parent in the other scripts.\n:::\n```lua\nNeoNet:UseParent(ReplicatedStorage.Remotes)\nlocal remoteEvent = NeoNet:RemoteEvent(\"PointsChanged\")\n```",
            "params": [
                {
                    "name": "parent",
                    "desc": "",
                    "lua_type": "Instance"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 73,
                "path": "src/NeoNet/init.lua"
            }
        },
        {
            "name": "RemoteEvent",
            "desc": "Gets a RemoteEvent with the given name.\nOn the server, if the RemoteEvent does not exist, then\nit will be created with the given name.\nOn the client, if the RemoteEvent does not exist, then\nit will wait until it exists for at least 10 seconds.\nIf the RemoteEvent does not exist after 10 seconds, an\nerror will be thrown.\n```lua\nlocal remoteEvent = NeoNet:RemoteEvent(\"PointsChanged\")\n```",
            "params": [
                {
                    "name": "name",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "RemoteEvent\r\n"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 89,
                "path": "src/NeoNet/init.lua"
            }
        },
        {
            "name": "RemoteFunction",
            "desc": "Gets a RemoteFunction with the given name.\nOn the server, if the RemoteFunction does not exist, then\nit will be created with the given name.\nOn the client, if the RemoteFunction does not exist, then\nit will wait until it exists for at least 10 seconds.\nIf the RemoteFunction does not exist after 10 seconds, an\nerror will be thrown.\n```lua\nlocal remoteFunction = NeoNet:RemoteFunction(\"GetPoints\")\n```",
            "params": [
                {
                    "name": "name",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "RemoteFunction\r\n"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 120,
                "path": "src/NeoNet/init.lua"
            }
        },
        {
            "name": "RemoteValue",
            "desc": "Gets a RemoteValue with the given name.\nOn the server, if the RemoteValue does not exist, then\nit will be created with the given name.\nOn the client, if the RemoteValue does not exist, then\nit will wait until it exists for at least 10 seconds.\nIf the RemoteValue does not exist after 10 seconds, an\nerror will be thrown.\n```lua\nlocal remoteValue = NeoNet:RemoteValue(\"ButtonClicks\")\n```",
            "params": [
                {
                    "name": "name",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "value",
                    "desc": "",
                    "lua_type": "T"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "{Event: RemoteEvent, Ready: boolean, Value: any, Specific: {}?, _connection: RBXScriptConnection}\r\n"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 151,
                "path": "src/NeoNet/init.lua"
            }
        },
        {
            "name": "GetValue",
            "desc": "Gets the current value of a RemoteValue.\n```lua\nprint(NeoNet:GetValue(\"ButtonClicks\"), \"Clicks\")\n```",
            "params": [
                {
                    "name": "name",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "any\r\n"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 212,
                "path": "src/NeoNet/init.lua"
            }
        },
        {
            "name": "Fire",
            "desc": "Fires the given RemoteEvent. Will Fire to all clients if used from the server\n```lua\nNeoNet:Fire(\"SomeEvent\", someParameters, middleware?)\n```\n:::tip\nIf the last parameter is a function then it will use that as middleware\n:::",
            "params": [
                {
                    "name": "name",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "...",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 229,
                "path": "src/NeoNet/init.lua"
            }
        },
        {
            "name": "Listen",
            "desc": "Returns an iterator for use in a loop or ECS context.\nArguments are iterated through from oldest to newest.\n:::caution\nBreaking the loop MAY drop all arguments gathered at that moment\nsince it clears the storage every time NeoNet:Listen is called.\n\nMiddleware also doesn't work yet.\n:::\n```lua\ngame:GetService(\"RunService\").Heartbeat:Connect(function()\n    for index: number, arg1, arg2 in NeoNet:Listen(\"DropItem\") do\n        --drop the item or whatever\n    end\nend)\n```",
            "params": [
                {
                    "name": "name",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "middleware",
                    "desc": "",
                    "lua_type": "RemoteClientMiddleware?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "() -> (number, ...any)\r\n"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 269,
                "path": "src/NeoNet/init.lua"
            }
        },
        {
            "name": "ConnectOnce",
            "desc": "Connects a handler function to the given RemoteEvent and disconnects after the first event.\n:::caution\nIf the middleware drops the request it will still be disconnected, use NeoNet:ConnectUntil if you want to only disconnect after middleware passes an event.\n:::\n```lua\nNeoNet:ConnectOnce(\"SomeEvent\", function(...) end)\n```",
            "params": [
                {
                    "name": "name",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "handler",
                    "desc": "",
                    "lua_type": "(...any) -> nil"
                },
                {
                    "name": "middleware",
                    "desc": "",
                    "lua_type": "RemoteServerMiddleware | RemoteClientMiddleware?"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 312,
                "path": "src/NeoNet/init.lua"
            }
        },
        {
            "name": "ConnectUntil",
            "desc": "Connects a handler function to the given RemoteEvent and disconnects after the first event that passes the middleware.\n(Similar to :ConnectOnce but it only disconnects after the middleware has continued a request.)\n```lua\nNeoNet:ConnectUntil(\"SomeEvent\", function(...) end, someMiddleware)\n```",
            "params": [
                {
                    "name": "name",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "handler",
                    "desc": "",
                    "lua_type": "(...any) -> nil"
                },
                {
                    "name": "middleware",
                    "desc": "",
                    "lua_type": "RemoteServerMiddleware | RemoteClientMiddleware?"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 345,
                "path": "src/NeoNet/init.lua"
            }
        },
        {
            "name": "Setup",
            "desc": ":::caution\ndeprecated (as of v1.2.0) or something please don't use;\nthis type of setup was exactly what I wanted to avoid with NeoNet\n:::\nSets up all the defined RemoteEvents, RemoteFunctions, and RemoteValues.\n```lua\nNeoNet:Setup {\n    RemoteEvents = {\n        \"ClickRequest\"\n    },\n    RemoteValues = {\n        ButtonClicks = 0\n    }\n}\n```\n    ",
            "params": [
                {
                    "name": "info",
                    "desc": "",
                    "lua_type": "RemoteSetupInfo"
                }
            ],
            "returns": [],
            "function_type": "method",
            "realm": [
                "Server"
            ],
            "source": {
                "line": 375,
                "path": "src/NeoNet/init.lua"
            }
        },
        {
            "name": "FireFor",
            "desc": "Fires the given RemoteEvent to the specified player.\n```lua\nNeoNet:FireFor(\"SomeEvent\", somePlayer, someParameters, middleware?)\n```\n    ",
            "params": [
                {
                    "name": "name",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player"
                },
                {
                    "name": "...",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [],
            "function_type": "method",
            "realm": [
                "Server"
            ],
            "source": {
                "line": 398,
                "path": "src/NeoNet/init.lua"
            }
        },
        {
            "name": "FireExcept",
            "desc": "Fires the given RemoteEvent to all players except the specified player.\n```lua\nNeoNet:FireExcept(\"SomeEvent\", somePlayer, someParameters, middleware?)\n```\n    ",
            "params": [
                {
                    "name": "name",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player"
                },
                {
                    "name": "...",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [],
            "function_type": "method",
            "realm": [
                "Server"
            ],
            "source": {
                "line": 420,
                "path": "src/NeoNet/init.lua"
            }
        },
        {
            "name": "FireList",
            "desc": "Fires the given RemoteEvent to all specified players.\n\n```lua\nNeoNet:FireList(\"SomeEvent\", {somePlayer1, somePlayer2}, someParameters, middleware?)\n```\n\n:::caution\nUses RemoteClientMiddleware for now due to uncertainty\naround how to handle a list of players for middleware.\n:::\n    ",
            "params": [
                {
                    "name": "name",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "players",
                    "desc": "",
                    "lua_type": "{Player}"
                },
                {
                    "name": "...",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [],
            "function_type": "method",
            "realm": [
                "Server"
            ],
            "source": {
                "line": 448,
                "path": "src/NeoNet/init.lua"
            }
        },
        {
            "name": "Connect",
            "desc": "Connects a handler function to the given RemoteEvent. (Server & Client)\n```lua\n-- Client\nNeoNet:Connect(\"PointsChanged\", function(points)\n    print(\"Points\", points)\nend)\n-- Server\nNeoNet:Connect(\"SomeEvent\", function(player, ...) end)\n```\n    ",
            "params": [
                {
                    "name": "name",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "handler",
                    "desc": "",
                    "lua_type": "(...any) -> nil"
                },
                {
                    "name": "middleware",
                    "desc": "",
                    "lua_type": "RemoteServerMiddleware?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "RBXScriptConnection\r\n"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 478,
                "path": "src/NeoNet/init.lua"
            }
        },
        {
            "name": "Handle",
            "desc": "Sets the invocation function for the given RemoteFunction.\n```lua\nNeoNet:Handle(\"GetPoints\", function(player)\n    return 10\nend)\n```\n    ",
            "params": [
                {
                    "name": "name",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "handler",
                    "desc": "",
                    "lua_type": "(player: Player, ...any) -> ...any"
                },
                {
                    "name": "middleware",
                    "desc": "",
                    "lua_type": "RemoteServerMiddleware?"
                }
            ],
            "returns": [],
            "function_type": "method",
            "realm": [
                "Server"
            ],
            "source": {
                "line": 501,
                "path": "src/NeoNet/init.lua"
            }
        },
        {
            "name": "SetValue",
            "desc": "Sets the value for the given RemoteValue.\n:::caution\nThis will completely ignore player-specific values and change the top value.\n:::\n```lua\nNeoNet:SetValue(\"ButtonClicks\", 0)\n```\n    ",
            "params": [
                {
                    "name": "name",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "value",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [],
            "function_type": "method",
            "realm": [
                "Server"
            ],
            "source": {
                "line": 526,
                "path": "src/NeoNet/init.lua"
            }
        },
        {
            "name": "SetTop",
            "desc": "Sets the top value for the given RemoteValue.\n```lua\nNeoNet:SetValue(\"ButtonClicks\", 0)\n```\n    ",
            "params": [
                {
                    "name": "name",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "value",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [],
            "function_type": "method",
            "realm": [
                "Server"
            ],
            "source": {
                "line": 543,
                "path": "src/NeoNet/init.lua"
            }
        },
        {
            "name": "SetFor",
            "desc": "Sets the player-specific value for the given RemoteValue.\n```lua\nNeoNet:Setfor(\"Role\", SomePlayer, \"Monster\")\n```\n    ",
            "params": [
                {
                    "name": "name",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player"
                },
                {
                    "name": "value",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [],
            "function_type": "method",
            "realm": [
                "Server"
            ],
            "source": {
                "line": 563,
                "path": "src/NeoNet/init.lua"
            }
        },
        {
            "name": "SetList",
            "desc": "Sets the player-specific value for the given set of players, for the given RemoteValue.\n```lua\nNeoNet:SetList(\"Role\", SomePlayers, \"Survivors\")\n```\n    ",
            "params": [
                {
                    "name": "name",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "players",
                    "desc": "",
                    "lua_type": "{Player}"
                },
                {
                    "name": "value",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [],
            "function_type": "method",
            "realm": [
                "Server"
            ],
            "source": {
                "line": 579,
                "path": "src/NeoNet/init.lua"
            }
        },
        {
            "name": "ClearValues",
            "desc": "Removes all player-specific values for the given RemoteValue.\n```lua\nNeoNet:ClearValues(\"Role\") --maybe the game ended in this example\n```\n    ",
            "params": [
                {
                    "name": "name",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [],
            "function_type": "method",
            "realm": [
                "Server"
            ],
            "source": {
                "line": 599,
                "path": "src/NeoNet/init.lua"
            }
        },
        {
            "name": "ClearValueFor",
            "desc": "Removes the player-specific value for the given RemoteValue.\n```lua\nNeoNet:ClearValueFor(\"Role\", SomePlayer) --maybe a survivor died so we remove their role\n```\n    ",
            "params": [
                {
                    "name": "name",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player"
                }
            ],
            "returns": [],
            "function_type": "method",
            "realm": [
                "Server"
            ],
            "source": {
                "line": 616,
                "path": "src/NeoNet/init.lua"
            }
        },
        {
            "name": "ClearValuesList",
            "desc": "Removes the player-specific value for the given set of players, for the given RemoteValue.\n```lua\nNeoNet:ClearValuesList(\"Role\", SomePlayer) --no idea what the example could be here\n```\n    ",
            "params": [
                {
                    "name": "name",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "players",
                    "desc": "",
                    "lua_type": "{Player}"
                }
            ],
            "returns": [],
            "function_type": "method",
            "realm": [
                "Server"
            ],
            "source": {
                "line": 627,
                "path": "src/NeoNet/init.lua"
            }
        },
        {
            "name": "GetFor",
            "desc": "Gets the player-specific value for the given RemoteValue.\nIf there is no player-specific value, the top value will be returned.\n```lua\nlocal role = NeoNet:GetFor(\"Role\", SomePlayer)\n```\n    ",
            "params": [
                {
                    "name": "name",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "any\r\n"
                }
            ],
            "function_type": "method",
            "realm": [
                "Server"
            ],
            "source": {
                "line": 639,
                "path": "src/NeoNet/init.lua"
            }
        },
        {
            "name": "Clean",
            "desc": "Destroys all remotes. This should really only be\nused in testing environments and not during runtime.\n    ",
            "params": [],
            "returns": [],
            "function_type": "method",
            "realm": [
                "Server"
            ],
            "source": {
                "line": 653,
                "path": "src/NeoNet/init.lua"
            }
        },
        {
            "name": "Observe",
            "desc": "Connects a function to the given RemoteValue, which will be called each time the value changes + when initially observed.\n```lua\nNeoNet:Observe(\"ButtonClicks\", function(newValue)\n    print(tostring(newValue) .. \" Clicks\")\nend)\n```\n    ",
            "params": [
                {
                    "name": "name",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "handler",
                    "desc": "",
                    "lua_type": "(any)"
                },
                {
                    "name": "middleware",
                    "desc": "",
                    "lua_type": "RemoteClientMiddleware?"
                }
            ],
            "returns": [],
            "function_type": "method",
            "realm": [
                "Client"
            ],
            "source": {
                "line": 689,
                "path": "src/NeoNet/init.lua"
            }
        },
        {
            "name": "Invoke",
            "desc": "Invokes the RemoteFunction with the given arguments.\n```lua\nlocal points = NeoNet:Invoke(\"GetPoints\")\n```\n    ",
            "params": [
                {
                    "name": "name",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "...",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "...any\r\n"
                }
            ],
            "function_type": "method",
            "realm": [
                "Client"
            ],
            "source": {
                "line": 716,
                "path": "src/NeoNet/init.lua"
            }
        },
        {
            "name": "IsValueReady",
            "desc": "Invokes the RemoteFunction with the given arguments.\n```lua\nlocal points = NeoNet:Invoke(\"GetPoints\")\n```\n    ",
            "params": [
                {
                    "name": "name",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean\r\n"
                }
            ],
            "function_type": "method",
            "realm": [
                "Client"
            ],
            "source": {
                "line": 739,
                "path": "src/NeoNet/init.lua"
            }
        }
    ],
    "properties": [
        {
            "name": "Middleware",
            "desc": "For access to the built-in middleware that comes with NeoNet such as RateLimiter and TypeChecker.",
            "lua_type": "{number: ModuleScript}",
            "source": {
                "line": 59,
                "path": "src/NeoNet/init.lua"
            }
        }
    ],
    "types": [
        {
            "name": "RemoteSetupInfo",
            "desc": "The information that should be sent into NeoNet:Setup",
            "lua_type": "{RemoteEvents: {string},RemoteFunctions: {string},RemoteValues: {string: any},}",
            "source": {
                "line": 14,
                "path": "src/NeoNet/init.lua"
            }
        },
        {
            "name": "RemoteClientMiddleware",
            "desc": "Type for client middleware. [See how to create your own middleware here.](/docs/CustomMiddleware)",
            "lua_type": "(Parameters: {number: any},) -> (boolean, {number: any})",
            "source": {
                "line": 26,
                "path": "src/NeoNet/init.lua"
            }
        },
        {
            "name": "RemoteServerMiddleware",
            "desc": "Type for server middleware. [See how to create your own middleware here.](/docs/CustomMiddleware)",
            "lua_type": "(Player: Player,Parameters: {number: any}) -> (boolean, {number: any})",
            "source": {
                "line": 36,
                "path": "src/NeoNet/init.lua"
            }
        }
    ],
    "name": "NeoNet",
    "desc": "Based off of 'Net' by sleitnick with added features\nsimilar to other networking modules.",
    "source": {
        "line": 7,
        "path": "src/NeoNet/init.lua"
    }
}