roblox-modules is a collection of modules and libraries for development in Roblox.
Available modules:
Animation = "dig1t/[email protected]"
Badge = "dig1t/[email protected]"
Cache = "dig1t/[email protected]"
GamePass = "dig1t/[email protected]"
Maid = "dig1t/[email protected]"
Palette = "dig1t/[email protected]"
Promise = "dig1t/[email protected]"
Ragdoll = "dig1t/[email protected]"
ReactUtil = "dig1t/[email protected]"
State = "dig1t/[email protected]"
Util = "dig1t/[email protected]"
Use version ^1.0 on any module to use its latest version.
local ReplicatedStorage = game:GetService("ReplicatedStorage")
-- Require Util from your installation location
-- For this example we'll use ReplicatedStorage.Packages as Util's parent location
local Util = require(ReplicatedStorage.Packages.Util)
local touchPart: BasePart = workspace:WaitForChild("Plate")
local connection: RBXScriptConnection? -- onPlayerTouch returns RBXScriptConnection
connection = Util.onPlayerTouch(touchPart, function(player: Player)
print(`{player.Name} touched the part!`)
-- Disconnect the connection
if connection then
connection:Disconnect()
end
end)
local ReplicatedStorage = game:GetService("ReplicatedStorage")
-- Require Palette from your installation location
-- For this example we'll use ReplicatedStorage.Packages as Palettes's parent location
local Palette = require(ReplicatedStorage.Packages.Palette)
print(Palette.get("blue", 500))
Method 1:
local Promise = require(ReplicatedStorage.Packages.Promise)
local myPromise: Promise.PromiseType = Promise.new(function(resolve, reject)
resolve("Hello World!")
end)
Method 2:
local Promise = require(ReplicatedStorage.Packages.Promise)
type PromiseType = Promise.PromiseType
local myPromise: PromiseType = Promise.new(function(resolve, reject)
resolve("Hello World!")
end)
Method 1:
local Maid = require(ReplicatedStorage.Packages.Maid)
local myMaid: Maid.MaidType = Maid.new()
Method 2:
local Maid = require(ReplicatedStorage.Packages.Maid)
type MaidType = Maid.MaidType
local myMaid: MaidType = Maid.new()
Method 1:
local Cache = require(ReplicatedStorage.Packages.Cache)
local myCache: Cache.CacheType = Cache.new()
Method 2:
local Cache = require(ReplicatedStorage.Packages.Cache)
type CacheType = Cache.CacheType
local myCache: CacheType = Cache.new()