while working with onyxui module, i got a problem, the [Children] function wasnt working why?
here is my code (i made a template for onyxui stuff)
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local OnyxUI = require(ReplicatedStorage.OnyxUI)
local Fusion = require(ReplicatedStorage.Fusion)
local ROnyxUI = ReplicatedStorage.OnyxUI
local Components = require(ROnyxUI.Packages.OnyxUI.Components)
local Themer = OnyxUI.Themer
local ColorUtils = require(ROnyxUI.Packages.ColorUtils)
local Util = OnyxUI.Util
local InnerScope = Fusion.innerScope
local scoped = Fusion.scoped
local Children = Fusion.Children
local Peek = Fusion.peek
local INDICATOR_COLORS = {
Util.Colors.Red["500"],
Util.Colors.Green["400"],
Util.Colors.Orange["500"],
Util.Colors.Stone["600"]
}
return function(Parent: GuiObject, ParentFrame: Frame)
local Scope = scoped(Fusion, Components)
local Theme = Themer.Theme:now()
local RandomDecimalNumber = Scope:Value(0)
local NotificationCount = Scope:Value(0)
local IndicatorColor = Scope:Value(INDICATOR_COLORS[2])
local RingThickness = Scope:Value(Theme.StrokeThickness["2"])
local RandomizerThread = task.spawn(function()
while task.wait(1) do
IndicatorColor:set(INDICATOR_COLORS[math.random(1, #INDICATOR_COLORS)])
if Peek(RingThickness) == Peek(Theme.StrokeThickness["2"]) then
RingThickness:set(Peek(Theme.StrokeThickness["3"]))
else
RingThickness:set(Peek(Theme.StrokeThickness["2"]))
end
end
end)
local RandomizerDecimalThread = task.spawn(function()
while task.wait(1) do
RandomDecimalNumber:set(math.random(1, 100000))
end
end)
local CountThread = task.spawn(function()
while task.wait(0.08) do
if Peek(NotificationCount) == 100 then
task.wait(3)
NotificationCount:set(1)
else
NotificationCount:set(Peek(NotificationCount) + 1)
end
end
end)
Scope:Button {
Parent = ParentFrame,
Content = {
"Shop ",
"rbxassetid://75029721407761",
".",
" Loneka ",
"rbxassetid://16735398592",
". Hi!",
}
}
Scope:NumberSpinner {
Parent = ParentFrame,
Value = RandomDecimalNumber,
Commas = true,
Prefix = "$",
Font = Enum.Font.FredokaOne,
}
Scope:Badge {
Parent = ParentFrame,
Content = { "Badge" },
}
Scope:Badge {
Parent = ParentFrame,
Content = { " PREMIUM" },
Color = Util.Colors.Amber["500"],
}
Scope:Badge {
Parent = ParentFrame,
Content = { "rbxassetid://103798699021677", "-50%" },
Color = Util.Colors.Red["500"],
}
Scope:Badge {
Parent = ParentFrame,
Content = { "rbxassetid://140490867216758", "LIMITED" },
Color = Util.Colors.Red["500"],
}
Scope:Badge {
Content = Scope:Computed(function(Use)
if Use(NotificationCount) >= 100 then
return { "99+" }
else
return { Use(NotificationCount) }
end
end),
Color = Theme.Colors.Primary.Main,
}
Scope:Text {
Text = "It's also proportional alongside text.",
}
Scope:Badge {
Content = { "rbxassetid://137979359742656", "TRUE" },
Color = Util.Colors.Green["500"],
}
Scope:IconButton {
Parent = ParentFrame,
Image = "rbxassetid://10814531047",
}
Scope:IconButton {
Parent = ParentFrame,
Image = "rbxassetid://10814531047",
Color = Theme.Colors.Primary.Main,
}
Scope:IconButton {
Parent = ParentFrame,
Image = "rbxassetid://11560341132",
Color = Util.Colors.Amber["500"],
}
Scope:IconButton {
Parent = ParentFrame,
Image = "rbxassetid://13405228418",
Color = Util.Colors.Red["500"],
Style = "Outlined",
}
Scope:IconButton {
Parent = ParentFrame,
Image = "rbxassetid://13405228418",
Color = Util.Colors.Red["500"],
Style = "Ghost",
}
Scope:IconButton {
Parent = ParentFrame,
Image = "rbxassetid://10814531047",
Disabled = true,
}
Scope:IconButton {
Parent = ParentFrame,
Image = "rbxassetid://10814531047",
Style = "Ghost",
Disabled = true,
}
Scope:Checkbox {
Parent = ParentFrame,
Icon = "rbxassetid://16743550373",
Color = Util.Colors.Red["500"],
}
Scope:Checkbox {
Parent = ParentFrame,
Color = Util.Colors.Green["500"],
}
Scope:SwitchInput {
Parent = ParentFrame,
}
Scope:SwitchInput {
Parent = ParentFrame,
Disabled = true,
}
Scope:TextArea {
Parent = ParentFrame,
Size = Scope:Computed(function(Use)
return UDim2.new(
UDim.new(1, 0),
UDim.new(0, (Use(Theme.TextSize["1"]) * 2) + (Use(Theme.Spacing["0.5"]) * 2))
)
end),
}
Scope:TextArea {
Parent = ParentFrame,
Size = UDim2.new(UDim.new(1, 0), UDim.new(0, 100)),
CharacterLimit = 60,
PlaceholderText = "This TextArea has a character limit.",
}
Scope:TextArea {
Parent = ParentFrame,
Size = UDim2.new(UDim.new(1, 0), UDim.new(0, 0)),
AutomaticSize = Enum.AutomaticSize.Y,
PlaceholderText = "This one will expand as you type.",
}
Scope:TextInput {
Parent = ParentFrame,
}
Scope:TextInput {
Parent = ParentFrame,
PlaceholderText = "Disabled TextInput.",
Disabled = true,
}
Scope:TextInput {
Parent = ParentFrame,
PlaceholderText = "Twenty characters only!",
CharacterLimit = 20,
}
Scope:TextInput {
Parent = ParentFrame,
PlaceholderText = "Something dangerous!",
Color = Theme.Colors.Error.Main,
}
Scope:TitleBar {
Parent = ParentFrame,
Content = { "Title" },
}
Scope:TitleBar {
Parent = ParentFrame,
Content = { "rbxassetid://75029721407761", "Shop" },
}
local Progress = Scope:Value(0)
local ColorThread = task.spawn(function()
while task.wait(1) do
Progress:set(math.random(0, 1000) / 1000)
end
end)
Scope:Text {
Parent = ParentFrame,
Text = "HP",
}
Scope:ProgressBar {
Parent = ParentFrame,
Progress = Progress,
Color = Util.Colors.Red["500"],
FlexMode = Enum.UIFlexMode.Fill,
}
Scope:Avatar {
Parent = ParentFrame,
Image = "rbxthumb://type=AvatarHeadShot&id=144146784&w=150&h=150",
}
Scope:Avatar {
Parent = ParentFrame,
Image = "rbxthumb://type=AvatarHeadShot&id=144146784&w=150&h=150",
CornerRadius = Scope:Computed(function(Use)
return UDim.new(0, Use(Theme.CornerRadius.Full))
end),
}
Scope:Avatar {
Parent = ParentFrame,
Image = "rbxthumb://type=AvatarHeadShot&id=144146784&w=150&h=150",
CornerRadius = Scope:Computed(function(Use)
return UDim.new(0, Use(Theme.CornerRadius.Full))
end),
RingEnabled = true,
RingColor = IndicatorColor,
}
Scope:Avatar {
Parent = ParentFrame,
Image = "rbxthumb://type=AvatarHeadShot&id=144146784&w=150&h=150",
CornerRadius = Scope:Computed(function(Use)
return UDim.new(0, Use(Theme.CornerRadius.Full))
end),
IndicatorEnabled = true,
IndicatorColor = IndicatorColor,
}
Scope:Avatar {
Parent = ParentFrame,
Image = "rbxthumb://type=AvatarHeadShot&id=144146784&w=150&h=150",
CornerRadius = Scope:Computed(function(Use)
return UDim.new(0, Use(Theme.CornerRadius.Full))
end),
RingEnabled = true,
RingColor = Util.Colors.Green["400"],
RingThickness = RingThickness,
}
Scope:Avatar {
Parent = ParentFrame,
Image = "rbxthumb://type=AvatarHeadShot&id=144146784&w=150&h=150",
CornerRadius = Scope:Computed(function(Use)
return UDim.new(0, Use(Theme.CornerRadius.Full))
end),
IndicatorEnabled = true,
IndicatorColor = Util.Colors.Sky["500"],
IndicatorIcon = "rbxassetid://13805569043",
}
end
try in any singular frame or thing just put [Children] and the other stuff and wont work why is that? btw here is my loader:
require(script.UI)(script.Parent, script.Parent.MainFrame.ScrollingFrame)