You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ensure :getRandomPoint() returns nil instead of recurring infinitely if zone parts are 0, e.g. if all streamed all:
functionZone:getRandomPoint()
localregion=self.exactRegionlocalsize=region.Sizelocalcframe=region.CFramelocalrandom=Random.new()
localrandomCFramelocalsuccess, touchingZonePartslocalpointIsWithinZonelocaltotalPartsInZone=#self.overlapParams.zonePartsWhitelist.FilterDescendantsInstancesiftotalPartsInZone<=0then-- Its important we return if there are no parts within the zone otherwise the checks below will recur infinitely.-- This could occur for example if streaming is enabled and the zone's parts disappear on the clientreturnnilendrepeatrandomCFrame=cframe*CFrame.new(random:NextNumber(-size.X/2,size.X/2), random:NextNumber(-size.Y/2,size.Y/2), random:NextNumber(-size.Z/2,size.Z/2))
success, touchingZoneParts=self:findPoint(randomCFrame)
ifsuccessthenpointIsWithinZone=trueenduntilpointIsWithinZonelocalrandomVector=randomCFrame.PositionreturnrandomVector, touchingZonePartsend
line 87 of tracker so that it accounts for parts being streamed in:
:getRandomPoint()
returns nil instead of recurring infinitely if zone parts are 0, e.g. if all streamed all:The text was updated successfully, but these errors were encountered: