Game not starting a server or taking very long to load upon joining

You didn’t specify rain anywhere in the code from what I can see, so rain is seen as nil for the script

How would I fix this problem? As this is probebly also the reason I can’t have a lot of scripts since it would then spawn way to many parts and not destroy them.

Is rain supposed to be script.Parent? If so, can’t you do this?

local rain = script.Parent

while true do
	if rain.Parent == workspace then
		repeat
			rain.Position = Vector3.new(rain.Position.X, rain.Position.Y - 1, rain.Position.Z)
			wait(0.01)
		until rain.Position.Y <= -69.715
		rain.Parent = nil
		break
	end
end

That fixes it. let me try duplicating the script now and see if it still breaks the whole game or not.

That fixed it and I’m now actually able to duplicate the script a lot without breaking the game! Thanks a lot. If u weren’t here rn I would have a broken game and would probebly have to re-start the whole 2nd stage.

1 Like

Haha, glad to be of help to you for 3 posts! I would recommend as well to look through your scripts to see what you could simplify, like for example

rain.Position = Vector3.new(rain.Position.X, rain.Position.Y - 1, rain.Position.Z)

Can be simplified to

rain.Position -= Vector3.new(0,1,0)

Which is the same as

rain.Position = rain.Position - Vector3.new(0,1,0)

Or just variables and what not