Import Services

roblox-py provides a simple interface to use import services instead of :GetService

Example 1:

import game.ReplicatedStorage

compiles to

local ReplicatedStorage = game:GetService("ReplicatedStorage")

Example 2:

import game.ReplicatedStorage as RS

compiles to

local RS = game:GetService("ReplicatedStorage")

Example 3:

from services import ReplicatedStorage

Example 4:

from services import ReplicatedStorage as RS

Last updated