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

Can I Have Some Help With Particles?

Asked by 7 years ago

I've been trying to make particles appear from the player's left and right arms upon f being pressed. This is what I got:

function onKeyPress(inputObject, gameProcessedEvent)
    if inputObject.KeyCode == Enum.KeyCode.F then
        print("Activating Powers . . .")
        local fire = Instance.new("ParticleEmitter") 
        fire.Parent = 
    end
end

game:GetService("UserInputService").InputBegan:connect(onKeyPress)

How would I continue / improve this script?

0
You didn't parent the ParticleEmitter to anything... TheeDeathCaster 2368 — 7y
0
I want to parent it to the left and right arms but I don't know how? adryan1352 2 — 7y
0
You would need to use two particle emitters as parts are only emitted from the parent User#5423 17 — 7y
0
You could create the first one then parent it, then clone it as a new variable and parent it. More efficient than creating two from scratch. But that was probably implied in kingdom's comment. Pejorem 164 — 7y
0
I did the cloning and all, but I am still stuck on how to parent them to tleft and right arms.Here is the script if it helps: adryan1352 2 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago
local character = game.Character

function onKeyPress(inputObject, gameProcessedEvent) 
    if inputObject.KeyCode == Enum.KeyCode.F then 
        print("Activating Powers . . .") 
        local fire = Instance.new("ParticleEmitter")  
        fire.Parent = game.Workspace.Character:FindFirstChild("Left Arm")
        local clone = fire:Clone()
            clone.Parent = game.Worspace.Character:FindFirstChild("Right Arm")


    end 
end 

game:GetService("UserInputService").InputBegan:connect(onKeyPress) 

0
That's the script I got so far, but are those the parents of the arms? adryan1352 2 — 7y
Ad

Answer this question