A Roblox plugin that transforms roblox instances! 🙀
Uses Instance.new()
Sample
local baseplate = Instance.new("Part")
baseplate.Name = "Baseplate"
baseplate.Locked = true
baseplate.Anchored = true
baseplate.Size = Vector3.new(512, 20, 512)
baseplate.BottomSurface = Enum.SurfaceType.Smooth
baseplate.TopSurface = Enum.SurfaceType.Smooth
baseplate.Color = Color3.fromRGB(98, 94, 98)
baseplate.CFrame = CFrame.new(Vector3.yAxis * -10) * CFrame.fromEulerAnglesXYZ(0, math.rad(10), 0)
do
local texture = Instance.new("Texture")
texture.Texture = "rbxassetid://6372755229"
texture.StudsPerTileV = 8
texture.StudsPerTileU = 8
texture.Transparency = 0.8
texture.Face = Enum.NormalId.Top
texture.Color3 = Color3.fromRGB(0, 0, 0)
texture.Parent = baseplate
endTransforms instances into Luau types
Sample
export type Baseplate = Part & {
Texture: Texture,
}Transforms instances into react lua elements
Sample
local react = nil -- provide react lib here
local e = react.createElement
local baseplate = e("Part", {
Locked = true,
Anchored = true,
Size = Vector3.new(512, 20, 512),
BottomSurface = Enum.SurfaceType.Smooth,
TopSurface = Enum.SurfaceType.Smooth,
Color = Color3.fromRGB(98, 94, 98),
CFrame = CFrame.new(Vector3.yAxis * -10) * CFrame.fromEulerAnglesXYZ(0, math.rad(10), 0),
}, {
Texture = e("Texture", {
Texture = "rbxassetid://6372755229",
StudsPerTileV = 8,
StudsPerTileU = 8,
Transparency = 0.8,
Face = Enum.NormalId.Top,
Color3 = Color3.fromRGB(0, 0, 0),
}),
})You can build the plugin by using the following command
rojo build plugin.project.json --output plugin.rbxm- add Tag serialization
- add Attributes serialization
- add React builder
-
datatype.luauplugin settings -
properties.luauplugin settings