Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-2

How the heck can i make a car regenerator? [closed]

Asked by 10 years ago

How the heck can i make a car regenerator? i need one!

I've tried but it always fails -_-

Closed as Not Constructive by IntellectualBeing, MrFlimsy, BlueTaslem, and Articulating

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
0
Answered by 10 years ago

I have done something similar (spawning in customizable vehicles). 1) You should probably put the car in Server Storage for reference 2) When the trigger is fired (i.e. the car is destroyed), just use the model:Clone() method alongside model:MoveTo(Vector3.new(x,y,z)

It should be something like this:

function onRespawn()
    local newcar = ServerStorage.Car:Clone()
    newcar:MoveTo(Vector3.new(wherever you want this)
end

--And then when trigger is fired/conditions are met, just :connect(onRespawn)

Hope this helped!

Ad