Having some problems creating particles and using Flipbook stuff

I want to make a particle effect using scripts. However, I am unable to figure out the flipbook stuff for the particles as "ParticleEmitterFlipbookLayout is not a valid member of “Enum” I had tried to search on how I can use the Flipbook stuff when creating a particle. Anyone knows how to use these Flipbook stuff?

local function createPoofAndSound(character)
	local propEffect = Instance.new("Part")
	propEffect.Name = "PropEffect"
	propEffect.Transparency = 1
	propEffect.Anchored = true
	propEffect.CanCollide = false
	propEffect.Position = character.HumanoidRootPart.Position
	propEffect.Parent = character

	local sound = Instance.new("Sound")
	sound.Name = "Transform"
	sound.SoundId = "rbxassetid://9116406643" 
	sound.Parent = propEffect

	local poof = Instance.new("ParticleEmitter")
	poof.Name = "Poof"
	poof.Texture = "rbxassetid://12996605668" 
	poof.Size = NumberSequence.new(6)
	poof.Parent = propEffect

	poof.Brightness = 5
	poof.LightEmission = 1
	poof.Lifetime = NumberRange.new(0.5, 1)
	poof.Rate = 5
	poof.Rotation = NumberRange.new(-360, 360)
	poof.RotSpeed = NumberRange.new(-45, 45)
	poof.SpreadAngle = Vector2.new(180, 180)
	poof.LockedToPart = false
	poof.Drag = 20

	poof.Color = ColorSequence.new(Color3.fromRGB(255, 255, 255))
	poof.Shape = Enum.ParticleEmitterShape.Box
	poof.ShapeStyle = Enum.ParticleEmitterShapeStyle.Volume

	-- Flipbook settings
	poof.FlipbookLayout = Enum.ParticleEmitterFlipbookLayout.Grid4x4
	poof.FlipbookMode = Enum.ParticleEmitterFlipbookMode.OneShot
	poof.FlipbookStartRandom = true

	sound:Play()
	poof.Enabled = true
	coroutine.wrap(function()
		wait(0.3)
		poof.Enabled = false
	end)()
end
1 Like

Remove Emitter from the enum name, as those are not valid enums.

- poof.FlipbookLayout = Enum.ParticleEmitterFlipbookLayout.Grid4x4
- poof.FlipbookMode = Enum.ParticleEmitterFlipbookMode.OneShot
+ poof.FlipbookLayout = Enum.ParticleFlipbookLayout.Grid4x4
+ poof.FlipbookMode = Enum.ParticleFlipbookMode.OneShot

Just FYI: You don’t need to use coroutine.wrap and wait to delay a task as there is task.delay.

- coroutine.wrap(function()
-     wait(0.3)
-     poof.Enabled = false
- end)()

+ task.delay(0.3, function()
+     poof.Enabled = false
+ end)
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.