• Spawning car with functions?
    1 replies, posted
So I am trying to spawn a car so that it will have a Think function running as soon as it spawns. The car spawns fine and everything works perfect but when I put this code AFTER all the spawning code (I have tried many methods) [code] #Attempt #1 function car.Think() print(car) end Attempt #2 function car:Think() print(car) end Attempt #3 car.Think = function() print(car) end [/code] All these dont bring back any lua errors but dont print the car either. How to do this? Thanks.
In the entity/vehicle spawn hook, run the think function.
Sorry, you need to Log In to post a reply to this thread.