Infinite Yield in `waitForComponent` During Migration from `1.2.3` to `1.3.1`
While migrating Flamework components from version
1.2.3
to 1.3.1
, I encountered an issue related to the fix for "references to uninitialized components" introduced in 1.2.4
.
Problem:
- I have a class that initializes during component startup and internally uses waitForComponent
.
- Due to the changes in component initialization, this now causes an infinite yield.
Normally, I would pass this
as an argument to avoid yield, but the class is part of the WCS library, which automatically replicates arguments passed to created classes - making it impossible to pass the component reference directly.
Are there any workarounds to handle this situation? Maybe I can defer waitForComponent
in a way that avoids the infinite yield?1 Reply
cc @fireboltofdeath
I can of course just make a getter function that will get the required component, but I would like to know if it is possible to do without it, since getting it every time is at least inconvenient
Component:
skill:
if I understood correctly and you asked about my code
Yes, I understand, I just can't figure out how to restructure it...
Normally, I would pass this as an argument to avoid yield, but the class is part of the WCS library, which automatically replicates arguments passed to created classes - making it impossible to pass the component reference directly.Alright, thanks for the help