R
roblox-ts2mo ago
kv_

Component on all instances of class

Is there any way to construct a component on all instances of a class like a Humanoid? I could create a controller and add a component on player joined/character added but I think that is unnecessary
Solution:
I just used a controller and a macro to create them
Jump to solution
4 Replies
Tesmi
Tesmi2mo ago
Find all the Humanoids and give them the components? Is that what you mean?
kv_
kv_OP2mo ago
Yes, moreso targeting only player humanoids, but that can be achieved using a predicate I would also want it to create components on such instances created at runtime, for obvious reasons
Tesmi
Tesmi2mo ago
Scripting API | Flamework
Flamework exposes a Components singleton which can be used on both server and client. Inside, there are several methods that allow you to interface with Flamework's components. You can grab a reference to this singleton the same way as you do any others, as documented.
Solution
kv_
kv_2mo ago
I just used a controller and a macro to create them

Did you find this page helpful?