Basically i've put an if statement to only execute code if a certain entity is touching the 'Shelf'. Still though, it appears that sometimes when i walk into the shelf myself (i know that player counts as an entity but i've made an if statement to avoid that) somehow it sometimes gets triggered really randomly.
Here's a short version of the current code
function ENT:StartTouch(ent)
if ent:GetClass() == "amphetamine_cooked" then --execute code here end
end
However even if i have that if statement in the code it still gets super wierd and somehow the drugs are moved forward when i walk into the shelf like this (ignore the wierd jump):
Screen capture
Sorry, you need to Log In to post a reply to this thread.