import Roact from "@rbxts/roact" import Slot from "./slot" import { useWorldContext } from "../contexts/worldContext" import Padding from "ReplicatedStorage/ui/components/padding" import { StarterGui } from "@rbxts/services" interface HotbarProps extends Roact.JsxInstanceProperties { Event?: Roact.JsxInstanceEvents Change?: Roact.JsxInstanceChangeEvents } StarterGui.SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false) function hotbar(props: HotbarProps): Roact.Element { const spreadableProps = { ...props } as Partial const { clientState } = useWorldContext() const keycodes: Enum.KeyCode[] = [ Enum.KeyCode.One, Enum.KeyCode.Two, Enum.KeyCode.Three, Enum.KeyCode.Four, Enum.KeyCode.Five, Enum.KeyCode.Six, Enum.KeyCode.Seven, Enum.KeyCode.Eight, Enum.KeyCode.Nine ] const items: Roact.Element[] = [] clientState.backpack.GetChildren().forEach((tool, i) => { items.push( ) }) return ( {...items} ) } export default hotbar