@@ -79,7 +79,7 @@ local CloudTypes : {GroupCloudDescription} = {
7979
8080
8181local CloudDescription = {
82- [" NormalCloud" ] = function (cloud )
82+ [" NormalCloud" ] = function ()
8383
8484 end ,
8585 [" RainCloud" ] = function (cloud )
@@ -94,7 +94,7 @@ local CloudDescription = {
9494
9595function checkIfPartInBounds (part )
9696 local parts = workspace :GetPartBoundsInBox (CFrame .new (0 ,0 ,0 ), Vector3 .new (7000 , 5000 , 7000 ))
97- for i ,v in pairs (parts ) do
97+ for _ ,v in pairs (parts ) do
9898 if v == part then
9999 return true
100100 end
104104
105105function Weather .new ()
106106 local self = setmetatable ({}, Weather )
107- self .CloudsFolder = Instance .new (' Folder' , workspace )
107+ self .CloudsFolder = Instance .new (' Folder' )
108+ self .CloudsFolder .Parent = workspace
108109 self .CloudsFolder .Name = " Clouds"
109110 Tween = TweenInfo .new (30 / Weather .timeScaleDivisor , Enum .EasingStyle .Sine , Enum .EasingDirection .InOut )
110111 for i ,v in pairs (CloudDescription ) do
@@ -113,7 +114,7 @@ function Weather.new()
113114 end )
114115 end
115116 game [" Run Service" ].Heartbeat :Connect (function ()
116- for i ,v in pairs (CollectionService :GetTagged (" FloatingObject" )) do
117+ for _ ,v in pairs (CollectionService :GetTagged (" FloatingObject" )) do
117118 v :PivotTo (CFrame .new (v .WorldPivot .Position + workspace .GlobalWind * Weather .timeScaleDivisor ))
118119 if Configuration .Debug .destroyItemsOutsideBounds then
119120 if not checkIfPartInBounds (v ) then
@@ -250,14 +251,15 @@ function Weather:Cloud(CloudTypeName, v2p)
250251 local CloudType = CloudTypes [CloudTypeName ]
251252 if not CloudType then return end
252253 local cloudDuration = CloudType .Duration
253- local model = Instance .new (" Model" , self .CloudsFolder )
254+ local model = Instance .new (" Model" )
255+ model .Parent = self .CloudsFolder
254256 model .ChildRemoved :Connect (function ()
255257 if # model :GetChildren () == 0 then
256258 model :Destroy ()
257259 end
258260 end )
259261 model .WorldPivot = CFrame .new (Vector3 .new (v2p .x , 100 , v2p .y ))
260- for i ,cldsDesc in pairs (CloudType .Clouds ) do
262+ for _ ,cldsDesc in pairs (CloudType .Clouds ) do
261263
262264 local offset = cldsDesc [1 ]
263265 local heightoffset = cldsDesc [2 ]
0 commit comments