• [Entity]Problem with Speed setting
    31 replies, posted
I can now spawn that entity, and use it. Effects of speed, gravity and health are working. However that "health remove" effect doesn't work. I got this error [CODE]Hook 'Godkill' Failed: entities/sent_godhat/init.lua:51: attempt to index local 'ply' (a nil value)[/CODE]
Why are you using a hook in a SENT, you should be using the appropriate ENT function, in you case being ENT:Think(). Also, I don't think you get arguments in Lua, you can't pass random arguments to a function that doesn't expect them and hope they work, you are passing activator, caller and ply to GodKill which is hooked to think. Think doesn't take any arguments.
Sorry, you need to Log In to post a reply to this thread.