Infinite yield possible on instance
I can't figure out why the type guard is failing for this component.
Class declaration:
Compiled typeguard:
Full error:

61 Replies
cannot extend it like thaat
has type
type Foo = Part & { Part: Part }I changed it to
but that compiles the same and the type guard still fails
it is a normal part
confusing to me because i also have this and it works

no clue
🥰
yippee
maybe dont call it Instance
because it would conflict with the Instance interface
I did try that
did not work :(
I have also tried deleting my out folder
F
Can you show the structure of the instance when it fails to instantiate?
Usually it happens when something is not anchored and falls through the map, or impacted by streaming
i did notice that when i break on the warning the part is not there, but it is moreso confusing because the part is rendered before the script breaks


i know its not replication/streaming since the object is obviously there ☹️

Transparent object is the descendant
Is it anchored? The part in a part?
And is it named Part
Both are anchored and the transparent part has cancollide disabled
And how big is the map?
not big
<1000 studs
the descendant is named part

Can you add something into onStart
Like a print
Cause it might say that it's waiting for guard, but actually created after warning
it does not print
Mmm
the component is obviously not constructing ever since otherwise it should be displaying a surfacegui
Oh wait, might be the silly reason T_T
unless it is and i have messed up the portal creation however i doubt it
You have your interface named as the existing thing
Aka Instance already exists

also already been ruled out
Mmm
Other thing
Can you override the predicate in @Component and print the instance structure
There's a function called predicate
Which decides whether the component should be instantiated
Or even guard function
I think I will give you insights on what's wrong
And print the structure of the instance
predicate does not run because instance guard fails first
You sure?
Isn't it wiseversa?
i can also try it with the instance guard
^ would be the best
And can you do GetFullName instead
if i am reading this correct i can not in fact do it with the instance guard

return Flamework.createGuard<ComponentInstance>()(a)
a callback with the proper return type is not a valid type and i am also not sure how to pipe the instance into the guard function i created

since without a callback i cannot capture it?
also the type assertion i need to do to pass
a to createGuard seems like it will not workPut this, but just do this in the function for guard
return Flamework.createGuard<ComponentInstance>()(a) as never
^ and careful
You have to call it twice
instance guard is the t.check type it cannot be a callback

Remove as never for a sec
ah ok its bc i wasnt calling it twice before that works
Mm?
ahahahahahahaahha
rojo did not sync any of those things i tried ever
💔
Imagine...
ok well there is this now

Does it still warn?
let me make it not aids to read
yes
the part seems to exist during the instance guard call?
Wait, it told onStart worked
yes it did im not sure what is happening now
Can you remove your guard?
it did construct
And can you do
override destroy(){
super.destroy();
print("Got destroyed")
}
its not being destroyed
Ok, then it's great?
ehh yes it is sort of fixed however the type guard initially still does not pass
i still get the warning although the component does eventually construct
Wut?
Prob for the other thing?
Can you search up instances with the same tag
Prob you accidentally put it somewhere else
yes the descendant was also tagged since it was duplicated from the parent
i am not sure what fixed this but apparently something i did while rojo was dead fixed it
thanks
Prob the thing with changing it to type
Solution
Yw ^w^