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?
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)