roblox-ts

R

roblox-ts

Join the community to ask questions about roblox-ts and get answers from other members.

Join

flamecs does not wanna start

ive got no idea this happens whenever i require it
No description

Properly use Flamework with React

Hey! I am using these 2 and I am wondering what is a good or the good way to make them work together properly. Because I assume a react gui would have a controller related but how do you make interaction between the 2, like how does the controller can affect the gui?...
Solution:
for example, you have a volume setting (a value from 0 to 1), the provider receives this value from the server, passes it to the view, when the client presses the volume up button, the view calls the OnChangeVolume function (which was passed through Props), passing a new value, inside this function the provider does all sorts of manipulations and passes the new value back to the view

Motion resolves immediately

I'm using ripple to display a banner when a new track plays, but the spring motion resolves to px(400) immediately.
Solution:
Here is the Frame ```tsx import React, { InstanceProps, ReactNode } from "@rbxts/react"; import { Colors } from "shared/util/colors"; import { Rounded } from "./Rounded";...

I am so confused about the type, it should be "string" but it says it can't be any

``ts public getHashCode(): number { const { X, Y, Z } = this.position; const positionString: string = ${X}${Y}${Z}`; ...

Readonly Charm atom

Hello, For the context I am creating a service that manage goals as abstract as possible, having a progress and goal numeric value, getting completed when progress reach goal. So I want other services creating the goal to be able to know when this goal progress and so I thought about using atom for progress value (why not also goal value) but returning the atom would mean the other service could change the atom value, is it possible to have a readonly version of this atom?...
Solution:
return function()
return atom()
end
return function()
return atom()
end
...

Compiler error with reflection transformer

So, after add the rbxts-transformer-reflection transformer in the plugins json i got this error (im pretty new on this so i dont know why i get this error and srry for my bad english)
No description

Test Post

please ignore
Solution:
this is the solution

React and Vide

I have both react and vide in my project because I am using jabby and react for my own UI. It is forwarding the global to vide which is really weird and how would I change it so it only points to react globals
No description

tables cannot be cyclic

Hello, I got this error and I am not really sure about how to fix it ```ts private pickItem(item: Instance | undefined) { print("ppick up hell yea");...

Serializer<T>.serialize() yielding

everything after "serializing..." is not printing, indicating that serialize() is yielding. i have fiddled around with the schema types to no avail.
No description

Asphalt can't upload asset

``` [WARN asphalt::sync::perform] Failed to sync asset assets/UI/SlotPart.svg: Failed to upload asset Caused by: Failed to get image ID Caused by: Failed to parse asset delivery response Caused by: error decoding response body...

[SOLVED] Confused about OOP

I have method like this which works weirdly ```ts addItem(Item: new (...args: never[]) => Item) { if (this.item === undefined) { this.item = new Item();...

Mocking `loadstring` doesn't work with ui labs with the global mock loadstring

```ts //test.story.ts import fixLoadModule from "common/shared/utils/fix-load-module"; import { runTests } from "common/shared/utils/run-tests"; import { FunctionStory } from "@rbxts/ui-labs";...
No description

New to charm, how would i go about turning this into a state manager?

```ts import { atom } from "@rbxts/charm"; import { Players } from "@rbxts/services"; // Define interfaces for the state...

UI with roblox-ts

Hello! I am new to roblox-ts and I heard about roact for the UI but I see that some tickets have the tag React, and so I am a bit confused on the subject. So I wanted to know what are the good ways or tech to use to make UI with roblox-ts. Thanks in advance!
Next