Initialize

Initializing and Starting Light Reflector

First, require Light Reflector by creating a LocalScript in a client service such as StarterPlayerScripts.

Your script should look similar to the accompanying sample below:

handler.client.luau
-- Light Reflector Handler
-- handler.client.luau

local ReplicatedStorage: ReplicatedStorage = game:GetService("ReplicatedStorage")
local lightreflector = require(ReplicatedStorage.Packages.lightreflector)
--                              ^ Set this to where you placed the module

Second, init the module.

handler.client.luau
lightreflector.init()

Third, configure the settings during runtime by calling lightreflector.config.applyOverrides().

handler.client.luau
lightreflector.config.applyOverrides({
    -- This is just an example! You may want to configure more values than this.
    -- See the config module for reference
    SignConfig = {
        signsFolders = {workspace.Signs}
    }
})

Fourth, start the module.

handler.client.luau
lightreflector.start()

A completed sample can be found at examples/vehicle-reflector-handler.client.luau!

Next, learn about registering vehicles!


Previous Page | Next Page