Body Particles Emitter

How do I link my particles to a player’s body through a module?

	function Module.Aura(player,char,Folder)
	local BlueFire = PM.BlueFire
	local PurpleFire = PM.PurpleFire
	local Shine = PM.Shine

	VFX.OnServerEvent:Connect(function(player,char,Folder)
		BlueFire:Clone().Parent = char.LeftFoot
		PurpleFire:Clone().Parent = char.LeftFoot
		Shine:Clone().Parent = char.LeftFoot
		BlueFire:Clone().Parent = char.LeftHand
		PurpleFire:Clone().Parent = char.LeftHand
		Shine:Clone().Parent = char.LeftHand
		BlueFire:Clone().Parent = char.LeftLowerArm
		PurpleFire:Clone().Parent = char.LeftLowerArm
		Shine:Clone().Parent = char.LeftLowerArm
		BlueFire:Clone().Parent = char.LeftLowerLeg
		PurpleFire:Clone().Parent = char.LeftLowerLeg
		Shine:Clone().Parent = char.LeftLowerLeg
		BlueFire:Clone().Parent = char.LeftUpperArm
		PurpleFire:Clone().Parent = char.LeftUpperArm
		Shine:Clone().Parent = char.LeftUpperArm
		BlueFire:Clone().Parent = char.LeftUpperLeg
		PurpleFire:Clone().Parent = char.LeftUpperLeg
		Shine:Clone().Parent = char.LeftUpperLeg
		BlueFire:Clone().Parent = char.LowerTorso
		PurpleFire:Clone().Parent = char.LowerTorso
		Shine:Clone().Parent = char.LowerTorso
		BlueFire:Clone().Parent = char.RightFoot
		PurpleFire:Clone().Parent = char.RightFoot
		Shine:Clone().Parent = char.RightFoot
		BlueFire:Clone().Parent = char.RightHand
		PurpleFire:Clone().Parent = char.RightHand
		Shine:Clone().Parent = char.RightHand
		BlueFire:Clone().Parent = char.RightLowerArm
		PurpleFire:Clone().Parent = char.RightLowerArm
		Shine:Clone().Parent = char.RightLowerArm
		BlueFire:Clone().Parent = char.RightLowerLeg
		PurpleFire:Clone().Parent = char.RightLowerLeg
		Shine:Clone().Parent = char.RightLowerLeg
		BlueFire:Clone().Parent = char.RightUpperArm
		PurpleFire:Clone().Parent = char.RightUpperArm
		Shine:Clone().Parent = char.RightUpperArm
		BlueFire:Clone().Parent = char.RightUpperLeg
		PurpleFire:Clone().Parent = char.RightUpperLeg
		Shine:Clone().Parent = char.RightUpperLeg
		BlueFire:Clone().Parent = char.UpperTorso
		PurpleFire:Clone().Parent = char.UpperTorso
		Shine:Clone().Parent = char.UpperTorso
		BlueFire:Clone().Parent = char.Head
		PurpleFire:Clone().Parent = char.Head
		Shine:Clone().Parent = char.Head
		BlueFire:Clone().Parent = char.HumanoidRootPart
		PurpleFire:Clone().Parent = char.HumanoidRootPart
		Shine:Clone().Parent = char.HumanoidRootPart
	end)
end

I did this but it doesn’t work

You didn’t define PM and VFX.
Also, Why are you passing arguments for the module fire when they aren’t used?

I made the cloning a little simpler by just checking the characters parts and cloning them there.

local module = {}

function module.Aura()
	local BlueFire = PM.BlueFire
	local PurpleFire = PM.PurpleFire
	local Shine = PM.Shine

	VFX.OnServerEvent:Connect(function(player,char,Folder)
		for _, i in pairs(char:GetChildren()) do
			if i:IsA('BasePart') then
				BlueFire:Clone().Parent = i
				PurpleFire:Clone().Parent = i
				Shine:Clone().Parent = i
			end
		end
	end)
end

return module

1 Like