Sunday, 16 February 2014

Lights following me

I have been using scripting to try and make two different lights follow me depending on player input.




I successfully have managed to do both, by pressing either R or B either the red or blue light will follow the player. I have done this by setting the lights co-ordinates = to the players, whenever W,A,S,D are pressed.
 
 
There is a variable that stores which light is currently following the player, once the light choice changes, so does that following the player. And the light returns to its original position.