CoderJoey
(Joey)
#1
for_, descin ipairs(model:GetDescendants()) do
end
‘desc’ does not infer type information that is is an Instance. Manually fixed by doing:
for _, desc: Instance in ipairs(model:GetDescendants()) do
end
Expected behavior
‘desc’ should be inferred as Instance.
1 Like
CoderJoey
(Joey)
#3
Base type is Instance for the array.
WheretIB
(WheretIB)
#4
Thank you for the report.
Should be an easy fix, we will change the return type to {Instance}
.
4 Likes
lol this has been a problem for years
CoderJoey
(Joey)
#6
Check GetChildren as well and any like functions, thank you!!!
WheretIB
(WheretIB)
#7
The fix for GetDescendants
is now live.
Return type of GetChildren
was correct when I last checked.
It still doesn’t work on game
or workspace
globals, but we have a separate fix in the works for those.
1 Like
system
(system)
Closed
#8
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.