Jump to content

self.entity:Release() crashes exe


Rick
 Share

Recommended Posts

I have the following code in a script attached to a "projectile" csg object. When the object collides I want to remove it, but this crashes the exe every time. The csg object also has an emitter as a child so not sure if that causes any issues, but I would think if I release a parent the child would also be released.

 

 

function Script:Collision(entity, position, normal, speed)
-- whenever a projectile collides with anything we remove it
self.entity:Release()
end

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...