Quick error. Attempt to index a nil value

Hello.

I got an error that i’m having trouble fixing on my CSGO flashbang.

[ERROR] lua/entities/ent_csgo_flashbang/init.lua:55: attempt to index a nil value

Code Snippet:
[lua]
for _,pl in pairs(player.GetAll()) do

	local ang = (self.Entity:GetPos() - pl:GetShootPos()):Normalize():Angle() // line 55

[/lua]

What’s wrong?

Normalize no longer returns a vector. GetNormalized is what you want to use.

Honestly, how can you have 48 addons released on workshop and still have troubles with this?

Old habits, and downright tiredness to be honest. Just a school project and i’m not the most awake right now. The C4 i posted on the WAYWO thread took me 8 hours to make, and most of that was because of errors I KNEW how to fix, but was distracted and they kept slipping away.

Thanks by the way, exactly what i was looking for.