I’ve been trying to create a flashlight entity that has a projected texture parented to it, making it a dropped flashlight turned on.
I get an error: “Tried to use a NULL entity!”
What am I doing wrong?
Here’s the (serversided) code:
local light = ProjectedTexture()
light:SetEnableShadows( true )
light:SetTexture( “effects/flashlight001” )
light:SetFOV( 50 )
light:SetFarZ( 512 )