ParticleEffect acting weird inside a hook

Hello guys, I’m playing with double jump and particle effects created for it.
I encountered a problem during a test phase. When playing in SP, everything works fine, the effect appears as I execute the second jump.
However, when in MP, I can only see the effect on another player while not seeing it on myself, and another person with whom I tested only sees the effect on me.
I attach the code below, maybe you’ll know the answer.


hook.Add("KeyPress", "Double Jump", function(Player, Input)
	if IsValid(Player) and Input == IN_JUMP then
	     ParticleEffect("jump_sign", Player:GetPos(), Player:GetAngles(), Player)
        end
end)

It is either because you parent the effect onto the player, so it will not show up on local player OR the effect only works in 3rd person.

Thank you for your answer, I tried what you said and unfortunatly it does not work.
I removed the parent argument of the function, and I did go in thirdperson but I still can’t see it.

Try using ParticleEffectAttach, with PATTACH_ABS_ORIGIN as the attach type and 0 for the attachment id

Same issue, I have to precise that the script is serverside.

I just tried out your code with a different effect and it works:

http://i.imgur.com/1ULbULO.jpg[/t]

3rd person:
[t]http://i.imgur.com/uQPUSpj.png

Code being:


hook.Add("KeyPress", "Double Jump", function(Player, Input)
	if IsValid(Player) and Input == IN_JUMP then
	     ParticleEffect("ExplosionCore_buildings", Player:GetPos(), Player:GetAngles(), Player)
    end
end)

Code was placed in lua/autorun/test.lua

Maybe the particle is wrong, I’ll look at it, thank you alot for your help Robotboy!

It’s not the particle btw, it seems to be related to the hook you are running it from.