SpecialMesh Isn't being parented to an object

Hey, there.

I’m having an issue where when my rain system runs, the SpecialMesh is parented to the first drop of rain and then after that, the SpecialMesh doesn’t parent to any of the other rain drops that appear.

If you need more information on how it works you can always ask me, let me know, thanks!

Code:

while true do
	RainSound:Play()
	for i = 1, RainEnd do 
		wait(1)
		local RandomNumber = math.random(1, 40) 
		local RandomNumber2 = math.random(1, 60)
		local RandomNumber3 = math.random(1, 40)
		RainSpawned = RainSpawned + 1
		wait()
		local Rain = Instance.new("Part")
		local RainMesh = Instance.new("SpecialMesh")
		local Weld = Instance.new("WeldConstraint")
		Rain.Size = Vector3.new(0.05, 1, 0.05)
		Rain.Color = Color3.fromRGB(180, 210, 228)
		Rain.Anchored = true
		Rain.CanCollide = false
		Rain.Position = Vector3.new(RandomNumber, RandomNumber2, RandomNumber3)
		Rain.Parent = workspace.Droplets
		Weld.Parent = game.Workspace.Droplets.Part
		RainMesh.MeshId = "rbxassetid://5171497068"
		RainMesh.Scale = Vector3.new(0.008, 0.028, 0.008)
		RainMesh.Parent = game.Workspace.Droplets.Part

That’s because you’re setting RainMesh’s Parent to a Part which can be any of the parts. It’s likely that all of the meshes are being parented to the same part. To fix it, parent it to the reference directly.

EDIT: The same issue is happening with your Weld.

RainMesh.Parent = Rain
1 Like