Particles not enabling

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I’m trying to make a magic game when the player says fire it will active the particles inside the candle model

  2. What is the issue? Include screenshots / videos if possible!
    Everything is working correctly it’s even printing but it’s jus not enabling the particles

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")

local FireSpellEvent = ReplicatedStorage:WaitForChild("LightCandleEvent") -- RemoteEvent for spell handling

FireSpellEvent.OnServerEvent:Connect(function(player, candle, action)
	-- Check if the player has unlocked magic
	if not player:GetAttribute("CanUseMagic") then
		print(player.Name .. " does not have magic unlocked.")
		return
	end

	-- Check if the player has enough mana
	local currentMana = player:GetAttribute("Mana")
	local spellCost = 5
	if currentMana < spellCost then
		print(player.Name .. " does not have enough mana to cast this spell.")
		return
	end

	-- Validate the candle and locate the Hitbox
	if candle and candle:IsDescendantOf(workspace) then
		local hitbox = candle:FindFirstChild("Hitbox")
		if not hitbox then
			print("No Hitbox found for candle:", candle.Name)
			return
		end

		-- Locate the Wick inside the Hitbox
		local wick = hitbox:FindFirstChild("Wick")
		if not wick then
			print("No Wick found inside Hitbox for candle:", candle.Name)
			return
		end

		-- Find all ParticleEmitters in the Wick
		local particleEmitters = {}
		for _, descendant in ipairs(wick:GetDescendants()) do
			if descendant:IsA("ParticleEmitter") then
				table.insert(particleEmitters, descendant)
			end
		end

		-- Check if any ParticleEmitters exist
		if #particleEmitters == 0 then
			print("No ParticleEmitters found in Wick for candle:", candle.Name)
			return
		end

		-- Handle the "fire" or "off" action
		if action == "fire" then
			-- Deduct mana and enable all ParticleEmitters
			player:SetAttribute("Mana", math.clamp(currentMana - spellCost, 0, math.huge))
			for _, emitter in ipairs(particleEmitters) do
				emitter.Enabled = true  -- Enable the particle emitters
				print("Enabled ParticleEmitter for:", candle.Name)
			end
			print(player.Name .. " lit the candle:", candle.Name)

		elseif action == "off" then
			-- Disable all ParticleEmitters
			for _, emitter in ipairs(particleEmitters) do
				emitter.Enabled = false  -- Disable the particle emitters
				print("Disabled ParticleEmitter for:", candle.Name)
			end
			print(player.Name .. " extinguished the candle:", candle.Name)
		end

		-- Update the player's GUI
		ReplicatedStorage:WaitForChild("UpdateManaGUI"):FireClient(player, player:GetAttribute("Mana"), player:GetAttribute("MaxMana"), true)
	else
		print("Invalid candle or candle not found in Workspace:", candle and candle.Name or "nil")
	end
end)

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

The script works.
But if it still doesn’t work for you try to enable the particles on the client side.
You could fire an event back to all clients with the particles and enable/disable them on client side.
Or you could create a flag for the particles by adding a new tag or changing an attribute and listen on the client side but change on the server.

Make sure your referenced remote event exists and is spelt correctly, i don’t see what would make it not work here

Are you sure the ParticleEmitter has visible Particles?
Enable it manually while testing the game in Studio. If you have a whole lot of ParticleEmitters or other graphics heavy items it just may not be able to handle the extra load.
Test again and select the ParticleEmitters to see if the Enabled property changes when you say fire. (you said ‘it’s just not enabling the particles’ but I wasn’t sure if you were looking at the Enabled Property, or just meant that the particles weren’t visible)

yup, try settings ur graphics to max, because when its in low or automatic, studio will reduce particle emmiter effects