Lua Question(s)

Hey everyone! I am a very junior lua coder and am having an issue with implementing player.Custom functions (V:). How do I implement these so I can call upon them without getting the value nil?

Can you give me an example of how you are doing this at the moment?
EDIT:
Well generally you want to use FindMetaTable(name)
Here’s how:
[lua]
local player=FindMetaTable(“Player”)
function player:CustomKill(message)
self:ChatPrint(message)
self:Kill()
end
[/lua]
Then if you would call the function like
[lua]
playerEntity:CustomKill(“And now, you are dead!”)
[/lua]
It would kill the player and show them the message “And now you are dead!”.
EDIT2:
In theory _R.Player should suffice, like
[lua]
local playerMeta=_R.Player
function playerMeta:CustomKill(message)
self:ChatPrint(message)
self:Kill()
end
[/lua]

Hey!thanks for the fast reply! But I was talking about adding a full new function. Like adding the function kill (this is assuming kill never existed).does that make more sense?

To be honest you can override any existing function, even the Kill function, it’s just a matter of the name. Hit me up on steam or show me your code for it and we can work it out I guess.

Well I dont want to override I want create