Acurrz
Acurrz
Rroblox-ts
Created by Acurrz on 4/6/2025 in #help
Why does this translate to a table?
No description
12 replies
Rroblox-ts
Created by Acurrz on 4/6/2025 in #help
New to charm, how would i go about turning this into a state manager?
import { atom } from "@rbxts/charm";
import { Players } from "@rbxts/services";

// Define interfaces for the state
interface PlayerMovementState {
readonly running: boolean;
readonly dashing: boolean;
}

interface PlayerCombatState {
readonly attacking: boolean;
readonly blocking: boolean;
}

export interface PlayerState {
readonly movement: PlayerMovementState;
readonly combat: PlayerCombatState;
}

// Default states
const DEFAULT_MOVEMENT_STATE: PlayerMovementState = {
running: false,
dashing: false,
} as const;

const DEFAULT_COMBAT_STATE: PlayerCombatState = {
attacking: false,
blocking: false,
} as const;

export const DEFAULT_PLAYER_STATE: PlayerState = {
movement: DEFAULT_MOVEMENT_STATE,
combat: DEFAULT_COMBAT_STATE,
} as const;

// Type for the player state map
type PlayerStateMap = {
readonly [K in string]?: PlayerState;
};
import { atom } from "@rbxts/charm";
import { Players } from "@rbxts/services";

// Define interfaces for the state
interface PlayerMovementState {
readonly running: boolean;
readonly dashing: boolean;
}

interface PlayerCombatState {
readonly attacking: boolean;
readonly blocking: boolean;
}

export interface PlayerState {
readonly movement: PlayerMovementState;
readonly combat: PlayerCombatState;
}

// Default states
const DEFAULT_MOVEMENT_STATE: PlayerMovementState = {
running: false,
dashing: false,
} as const;

const DEFAULT_COMBAT_STATE: PlayerCombatState = {
attacking: false,
blocking: false,
} as const;

export const DEFAULT_PLAYER_STATE: PlayerState = {
movement: DEFAULT_MOVEMENT_STATE,
combat: DEFAULT_COMBAT_STATE,
} as const;

// Type for the player state map
type PlayerStateMap = {
readonly [K in string]?: PlayerState;
};
4 replies
Rroblox-ts
Created by Acurrz on 3/23/2025 in #help
I keep getting this error when trying to publish packages
npm notice Publishing to https://registry.npmjs.org/ with tag latest and public access npm ERR! code E404 npm ERR! 404 Not Found - PUT https://registry.npmjs.org/@rbxts%2fnext-roblox - Not found npm ERR! 404 npm ERR! 404 '@rbxts/[email protected]' is not in this registry. npm ERR! 404 npm ERR! 404 Note that you can also install from a npm ERR! 404 tarball, folder, http url, or git url.
4 replies
Rroblox-ts
Created by Acurrz on 2/21/2025 in #help
useEffect() being called before reference is assigned
No description
56 replies
Rroblox-ts
Created by Acurrz on 2/19/2025 in #help
Components not allowing other components as children
No description
77 replies
Rroblox-ts
Created by Acurrz on 2/17/2025 in #help
Roblox TS Expecting all Luau modules to have a default property
No description
28 replies