This hook doesn't seem to work for me

I have a sandbox server and I am coding stuff on there to learn coding but players can still join,
and some of them asked me to make an buildmode addon.

If the player says !buildmode he gets godmode and it tells him that he has godmode now.

But this hook doesn’t seem to work.

Here is the code
if(attacker:HasGodMode()) then
return false
return true

It’s “PlayerShouldTakeDamage”, not “GM:PlayerShouldTakeDamage”. Make sure you’re running this code serverside as well.

[editline]21st February 2017[/editline]

Take a look here:

Well thats sad, I thought about that but them I thought it should work.

Thanks it works now :slight_smile: