roblox-ts

R

roblox-ts

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

Join

How to fix and optimize React UI

I noticed that my react ui is not optimized at all, the game freezes for a second when opening something. I am new to React, so I understand that most likely I wrote something terrible. I am interested in a guide or advice on how to find the cause of delays, optimize it, fix it, etc.

Attempt to call a table value

```ts import { Manim } from "@rbxts/manim"; import { BaseScene } from "../../scene"; @Manim.Decorators.Scene({...

Is there a way to get all the types, that has specific property in them?

In my case, I need to get all the instances that has LocalTransparencyModifier property.

React Error when using conditionals

When I use this conditional:
return <>{render && children}</>;
return <>{render && children}</>;
I get a strange error of:...

how can you detect a click that was made outside the required component?

I want to make something like a context menu on the Windows OS desktop, I did the positioning when I click on the frame, but I don’t know how I can detect the click outside of the menu to hide it. Do you have any suggestions?

Cannot create custom type in Centurion

I'm getting a weird error that the type is not registered

useEffect() being called before reference is assigned

im making a react roblox ts component that should tween its size when the component is called and created but the useEffect() function is creating the tween before the useRef() is assigned to the frame
No description

Jecs Cleanup Attributes Help

I'm struggling to figure out how Jec's component traits work. I have a state machine like system that attaches a tag to an entity called "DoingATest". I've setup a function that runs on startup to setup the cleanup: ```ts print("init cleanup");...

Should you use CanvasGroup?

It seems like this is a relatively new thing. I'm concerned about its performance with react, how good it is in general

Can you disable compilation of some parts of the code?

I have a big change and the project will not compile until if fix everything. Is it possible to implement something like feature enabled flag?...

Probably something silly

I'm new to roblox-ts and I was made aware by the docs that all globals from the roblox api are present in the typescript typings. For some reason using a simple print statement returns an error stating that no arguments can be present within the vs code error handler. Does anyone know why and how to fix this?
No description

Weird issue when Importing Jecs

I am using @rbxts/jecs and I am having a weird issue. For some reason why I import it, the compiled result is "jecs.lua" instead of just "jecs". Error: ```typescript Infinite yield possible on '[email protected]:WaitForChild("jecs.luau")' - Studio 12:24:51.680 Stack Begin - Studio 12:24:51.680 Script 'ReplicatedStorage.rbxts_include.RuntimeLib', Line 53 - function import - Studio - RuntimeLib:53...

ui labs flamework

How would I make it so I can use flamework dependencies with ui labs, I tried flamework-react-utils and it doesn't work because I have to ignite but then I tried to ignite during ui labs it doesn't work because its not runtime

Weird jittering when moving model over terrain

Why is the model moving like that? I expected it to always snap to the ground. It's like it's ray hit something in mid air?
No description