of     1   

Lightwader
#58875149Wednesday, November 30, 2011 10:56 AM GMT

Hi there, fellas! I am ading some cars into my place and i'd like to have a little help with them. I want to make it so, that once someone takes a car and drives away, a new one spawns but doesn't replace the car the player took. So, it would be very friendly if someone helped me with this. Oh by the way, i use the cars from roblox' "vehicles" set.
RoflBread
#58876480Wednesday, November 30, 2011 12:40 PM GMT

spawner = script.Parent car = "Ford_Gt" to_clone = game.Lighting.Ford_Gt while wait(1) do c = game.Workspace:FindFirstChild(car) if c then if (c.PrimaryPart.Position - spawner.Position).magnitude > 100 then clone = to_clone:clone() clone.Parent = game.Workspace clone:MoveTo(spawner.Position + Vector3.new(10,10,10)) end end end ------ Every so often checking the magnitude is a way i think you could do that. Just have clones of the car models in ligthing. Hope this helps ;)
Lightwader
#58880237Wednesday, November 30, 2011 4:26 PM GMT

Thank you for this information but... can you please explain me where do i need to type this script in?
techepicface
#58880375Wednesday, November 30, 2011 4:33 PM GMT

In the car, but not in any of the parts of the car, just the car itself.
RoflBread
#58880827Wednesday, November 30, 2011 4:53 PM GMT

Well i guess you could put it anywhere, but it should work if you place it in the brick you want to 'spawn the cars', granting you edit the variables.
pokelord910
#58880965Wednesday, November 30, 2011 4:58 PM GMT

if you put it in the car, you see, it would never be able to tell when the car was a specific distance from the regen point
Lightwader
#58921787Thursday, December 01, 2011 3:48 PM GMT

sorry for annoying you but i just can't make them auto-regen... it would be very nice if you told me how to make them do that...
zars15
#58921814Thursday, December 01, 2011 3:50 PM GMT

Why you use magnitude? Better way is using region3. Soo if car is not on the spawn pad then the new one will spawn after few secs
pokelord910
#58923766Thursday, December 01, 2011 5:42 PM GMT

spawner = script.Parent car = "Ford_Gt" to_clone = game.Lighting.Ford_Gt while true do c = game.Workspace:FindFirstChild(car) if c then if (c.PrimaryPart.Position - spawner.Position).magnitude > 100 then wait(5) clone = to_clone:clone() clone.Parent = game.Workspace clone:MoveTo(spawner.Position + Vector3.new(10,10,10)) wait(1) end end end ------

    of     1