Particle Randomly Deletes

When the script runs, a storm forms, and then randomly a funnel cloud then a tornado forms, but when the tornado fades in and begins to spawn, the speckle (is what its called and is put inside tornado) randomly deletes! Its so random and I have no idea why it does it. Is there a problem in my script? Please ask any questions that may help or things needed to understand it.

					for _, v in pairs(Storm:GetChildren()) do
						if v.Name == "Spawn" then
							TornadoModule.FormTornado()
							newTornado.Position = v.Position + Vector3.new(0, -5.289, 0)
							newTornado.Orientation = Vector3.new(0, 0, 180)
							local tweenInfo = TweenInfo.new(6, Enum.EasingStyle.Cubic, Enum.EasingDirection.Out)
							local giantSize = TornadoModule.TornadoSize()
							local SizeTween = TweenService:Create(newTornado, tweenInfo, { Size = giantSize })
							SizeTween:Play()

							local newParticle = game.ReplicatedStorage.Replicables.Specks:Clone()
							newParticle.Parent = newTornado
							newParticle.Name = "Specks"
							
							local specks = newTornado.Specks
							if specks then
								local specksEmitter = specks:FindFirstChildOfClass("ParticleEmitter")
								if specksEmitter then
									specksEmitter.Rate = 0
									specks.Size = newTornado.Size + Vector3.new(0, -6, 0)
									specks.Position = newTornado.Position + Vector3.new(0, -7, 0)
									wait(4)
									specksEmitter.Rate = 100
								end
							end
							print("Success")
						end
					end

Hello for the 3rd time!

What gets deleted, the part itself or the particles from the ParticleEmitter?

If it’s the part, assuming it’s unachored, you would have to position and weld it to your tornado, or else it’s just going to fall (and possibly tossed around).

specks.CFrame = newTornado.CFrame

local weldConstraint = Instance.new("WeldConstraint")
weldConstraint.Part0 = specks
weldConstraint.Part1 = newTornado
weldConstraint.Parent = specks

If it’s the particles of the ParticleEmitter, that depends on the graphical settings of the client.

1 Like

Oh my gosh hello again! It is a part itself and a particle emitter is inside it, I did a check to see where it goes wrong and it printed delete here: ```lua
for _, v in pairs(Storm:GetChildren()) do
if v.Name == “Spawn” then
print(“check 1”)
TornadoModule.FormTornado()
newTornado.Position = v.Position + Vector3.new(0, -5.289, 0)
newTornado.Orientation = Vector3.new(0, 0, 180)
local tweenInfo = TweenInfo.new(6, Enum.EasingStyle.Cubic, Enum.EasingDirection.Out)
local giantSize = TornadoModule.TornadoSize()
local SizeTween = TweenService:Create(newTornado, tweenInfo, { Size = giantSize })
SizeTween:Play()

						local newParticle = game.ReplicatedStorage.Replicables.Specks:Clone()
						newParticle.Parent = newTornado
						newParticle.Name = "Specks"
						print("Check 2")
						local specks = newTornado.Specks
						if specks then
							print("Check3")
							local specksEmitter = specks:FindFirstChildOfClass("ParticleEmitter")
							if specksEmitter then
								specksEmitter.Rate = 0
								specks.Size = newTornado.Size + Vector3.new(0, -6, 0)
								specks.Position = newTornado.Position + Vector3.new(0, -7, 0)
								wait(4)
								specksEmitter.Rate = 100
							end
							if specks.Parent == newTornado then
								print("exists")
							else
								print("deleted!")
							end
							print("Check4")
						end
						print("Success")
					end
				end

Can you reformat this reply? Also, send me everything that prints.

1 Like

well that was the problem, anchor, I dont know how, but after 2.5 hours of trying to fix it IT WAS A DARN BUTTON lol I want to ask one question and I will be done with this. The tweening for some reason doesnt expand to a tornado. It just teleports, and everything is correct I suppose. But it wont work ```lua

for _, v in pairs(Storm:GetChildren()) do
						if v.Name == "Spawn" then
							print("check 1")
							TornadoModule.FormTornado()
							newTornado.Position = v.Position + Vector3.new(0, -5.289, 0)
							newTornado.Orientation = Vector3.new(0, 0, 180)
							local tweenInfo = TweenInfo.new(6, Enum.EasingStyle.Cubic, Enum.EasingDirection.Out)
							local giantSize = TornadoModule.TornadoSize()
							local SizeTween = TweenService:Create(newTornado, tweenInfo, { Size = giantSize })
							SizeTween:Play()

I don’t know exactly how your tornado works, if it’s unachored or not. I’ll just give you a few information which you can then figure it out:

  1. Setting the Position of a BasePart will respect collision. That means if you have a block at 0, 0, 0 that is 50 studs as it’s height (so 25 upwards), if you try to position another block at 0, 0, 0, it will move it >= 0, 25, 0. To counter that, you would have to set the CFrame which does not respect collision.

  2. Changing the Size property expands it from the center - that is it’s anchor point. If you have a block on the floor that is unanchored and you decide to change it’s height an additional 20 studs, it will extend 10 studs upwards but also 10 studs downwards, clipping through the floor. Physics takes over and doesn’t like parts sticking to each other, so it will do everything it can to spit it out.

1 Like

its unachorched cause it needs to move with the storm its also a meshpart (although it is a basepart pretty much with custom physics)

im pretty sure it doesnt delete, its a roblox issue, try to test this on roblox rather than studio

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.