I figured this would be a simple script that I could do to test my Lua abilities. I wanted to make a console command (that i could bind to a key) to spawn a nuke wherever i was looking. I wanted to see if I could do it myself, from scratch, but I can’t (yet).
Here’s what I have so far:
local ent = ents.Create(“sent_nuke”)
ent = sent_nuke
local pos = self.Owner:GetShootPos()
ent:SetPos( pos )
concommand.Add( “nukevision_go”, NukeSpawn() )
I’m saving it in lua\autorun\client
Right now I’m getting this error: autorun/client/nukevision.lua:4: attempt to index global ‘self’ (a nil value)
Honestly I don’t know if I’m even on the right track.