Particle Not Emitting

Hey There Everyone,

Today I’ve made a particle Hitting Effect, But when I try to Emit the particle it doesn’t`show.


Here is my script:
local function HitEffects()

	--// Creating a New Hit Effect
	local HitEffect = EffectsFolder.HitEffect:Clone()
	HitEffect.CFrame = Object.PrimaryPart.CFrame
	HitEffect.Parent = workspace

	--// Emmision
	HitEffect["Hit Particle"]:Emit(1)

end

The script only works when I add a wait of 1 second, possibly meaning that I’m emitting the particle before it loads, but I’m not sure.

If there is any workaround other than the wait of 1 second, please tell me, thanks a lot for your help!

2 Likes

You might want to replace HitEffect["Hit Particle"] with HitEffect:WaitForChild("Hit Particle") as this would wait for the particles instance to load in.

4 Likes

not sure if it’s the same for you but for my case it’s something to do with “streamingenabled” atleast in all my scenarios

u got it pretty much correct, ur emitting the particle before it actually even loads somehow despite the order

a task.wait(.01) is usually what i do before emitting to bypass this
(or ig disabling streaming enabled but that’s dependant if u want ur game to be)

2 Likes

I tried that but it still didn’t load, I’ll test some other particles out to check if its js something wrong with the particle itself.

2 Likes

Are you immediately spawning the Hit Effect right after you join the game? If so just add a loading screen and is your script a local one or a server sided one and where is the effect located? Also check if the Hit Particle has any settings like a transparency or size adjustments.

2 Likes

Then just make an invisible part and link it there

2 Likes

yes I did all that, as I said adding a wait will fix the issue. This must mean that it has something to do with the loading of the particle, but I dont want to use a wait as a workaround as it is unreliable so players with slow devices may not see the particle.

2 Likes

Just add a loading screen no? Or what is the main idea of the game?

3 Likes

the game is a survival theme, I want the hit effect to play when the player hits the tree with a rock

2 Likes

then why is it not loading? There should be an attachment to the effect and then you just make the attachment parent to the part which in this case is the tree. Then loop everything inside the attachment and enable them if they are a part and Emit(1)

2 Likes

You are correct, try putting the emit line into task.defer or something similar.

2 Likes