CradleClient
This is the API Documentation for the CradleClient module. It contains all the API functions for the client.
local Cradle = require(game:GetService("ReplicatedStorage").Cradle)
Properties
RemoteComm
CradleClient.RemoteComm:
table
Contains the Remote Communication Module.
tip
See the Networking guide to learn more about it.
Component
CradleClient.Component:
table
Contains the Component Module.
tip
See the Components guide to learn more about it.
Modules
CradleClient.Modules:
table
Contains all modules in the Modules folder.
Shared
CradleClient.Shared:
table
Contains all modules that is stored in the Modules Folder.
Packages
CradleClient.Packages:
table
Contains all modules in the Packages folder.
Util
This was deprecated in v1.0.0
This item is deprecated. Do not use it for new work.
CradleClient.Util:
table
Contains all modules in the Packages folder.
Functions
CreateController
This item only works when running on the client. ClientCreates a controller for the client.
caution
Controllers must be created before calling Cradle:Start()
Usage
local SomeController = Cradle:CreateController({
Name = "SomeController",
})
function SomeController:Init()
print("SomeController has been initialised!")
end
function SomeController:Start()
print("SomeController has started!")
end
GetController
This item only works when running on the client. ClientGets a controller by name. Throws a warning if the controller does not exist.
GetService
CradleClient:
GetService
(
serviceName:
string
) →
Service
Gets a service by name. Throws a warning if the service is not found.
caution
This will only return services that have been exposed to the client with its Client table.
Load
CradleClient:
Load
(
) →
nil
Loads all services and components.
caution
This must be called before calling Cradle:Start()
Start
CradleClient:
Start
(
) →
nil
Starts all services and components.
caution
This must be called after calling Cradle:Load()