Sent errors!

I made sent which works but whenever you press e to it to use it I get the error:



includes\util.lua:199: attempt to call method 'IsValid' (a nil value)


Also I can’t get the sent to remove when I press e to it.

what are you trying to :IsValid() on?

There are three files: Shared.lua, cl_init.lua, init.lua

None of them contain the word valid.

Can you just give us the code?

hmmm there has to be a :IsValid() in the Lua somewhere unless the engine itself checks player:IsValid() automatically… are you pressing E on the entity as a “normal” player or do you have some addon that changes something about you.

[editline]07:51PM[/editline]

done in the reply window so it might not work.
[lua]
function ENT:Use( ply )
if ( ply:IsPlayer() ) then
self.Entity:Remove()
end
end
[/lua]