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

How To Create A 2D Particle Emitter?

Asked by
Donut792 216 Moderation Voter
4 years ago

alright so i tried using other peoples modules and just never got the results i wanted they all ended up breaking and i couldnt get them to work right so i decided to not use a module and just make a localscript that will do the job and from my understanding my script should work perfectly fine

LocalScript:

local particle = script.Parent
local OriginalSpot = particle.Position
local TweenService = game:GetService("TweenService")
while true do
    local Clone = particle:Clone()
    Clone.Rotation = math.random(0,90)
    Clone.Visible = true
    local goal = {}
    goal.Position = OriginalSpot + UDim2.new(math.random(-10,10),0,math.random(1,10),0)
    local tweenInfo = TweenInfo.new(1) 
    local tween = TweenService:Create(Clone, tweenInfo, goal) 
    tween:Play()
    wait(.3)
end
0
So it just doesnt work? 123nabilben123 499 — 4y
0
You never set the parent of Clone to whatever. It's just there 123nabilben123 499 — 4y
0
Do: Clone.Parent = script.Parent 123nabilben123 499 — 4y
0
Also for a particle effect you might want to have "layers" Not just random blocks. A first layer will be more "inside" of the particle's radius while the second layer will be more outside. All of these are actually random but have a different radius. 123nabilben123 499 — 4y
View all comments (3 more)
0
sweet that worked and it so simple but now my issue is that they are going in the wrong direction they are going down instead of up but i can fix that thank you Donut792 216 — 4y
0
Donut you can just rotate the GUI. Have you tried that? Also sorry for being late. 123nabilben123 499 — 4y
0
Consider upvoting my comment since it worked 123nabilben123 499 — 4y

Answer this question