jugo49
|
  |
| Joined: 29 Jul 2008 |
| Total Posts: 21 |
|
|
| 16 Jun 2014 08:57 PM |
I need a regen script that does the following: 1. when a player is riding a car for example if someone pushes the regen button it will not make the car that the player is riding dissapear instead it will spawn a new one near the regen button.
2. that the script can check if there is already a car for example spawned by the regen button so if someone pushes the button it will not spawn another car on top of the other one glitching them out.
Thanks for any and all help, Ive been having major problems with this and i cant figure out how to do it. ive seen some people have similar regen buttons in their games but i dont know how they work. |
|
|
| Report Abuse |
|
|
|
| 16 Jun 2014 08:58 PM |
1. clone car, then spawn it as clone.
2. use region3, detect if car is within spot before regen. |
|
|
| Report Abuse |
|
|
rens321
|
  |
| Joined: 16 Feb 2011 |
| Total Posts: 11470 |
|
|
| 16 Jun 2014 09:01 PM |
Or you can do if Model.PrimaryPart.Position ~= Vector3.new(x,y,z) then |
|
|
| Report Abuse |
|
|
|
| 16 Jun 2014 09:03 PM |
| You can also use magnitude. |
|
|
| Report Abuse |
|
|
jugo49
|
  |
| Joined: 29 Jul 2008 |
| Total Posts: 21 |
|
|
| 16 Jun 2014 09:43 PM |
| Can you give me a script as an example so i can see how it works, My Lua knowlegdge is very limited. Im only beginning to learn scripting. |
|
|
| Report Abuse |
|
|