Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I use Clone() with a parent, without using Instance.new()?

Asked by 6 years ago

The wiki clearly says it's initial parent is nil, and if you put something inside the parentheses, it doesn't error but doesn't work. I'm trying to clone a ParticleEmitter from ServerStorage to a part generated by a script, while avoiding Instance.new() for 1 reason: The NumberSequences. It's difficult to script an Instance.new() with a ParticleEmitter. Please do not tell me how to use NumberSequences instead of Clone(). Thank you.

1 answer

Log in to vote
0
Answered by 6 years ago
local particleEmitter = game:GetService("ServerStorage").ParticleEmitter:Clone()
particleEmitter.Parent = parent -- Insert where the parent is
----OR----
game:GetService("ServerStorage").ParticleEmitter:Clone().Parent = parent -- same thing
0
Thank you. I forget so much about simple things. ShutokouBattle 227 — 6y
Ad

Answer this question