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

How to make a car respawn every 7 seconds?

Asked by 3 years ago

I made a car that falls off the map so it looks like there are an endless amount of cars but once it falls off I can't get it to respawn, this is what I thought would work, which obviously didnt. I also need it to respawn in one place not the place it is when falling.

while true do
    clone = script.Parent:Clone()
        wait(7)
        clone.Parent = game.Workspace
    end
end

It needs to be respawning the car in a loop not just a couple times

0
Damn so I help a lot of people and get banned, now no-one helps me PatrykWalat 4 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago

Alr so u just dont need the 2nd end

and if u want to move it u can either use position, or moveto() if position doesn't work just use moveto() by replacing position with moveto()

local position = Vector3.new(0, 0, 0)
while true do
    clone = script.Parent:Clone()
    wait(7)
    clone.Parent = game.Workspace
    clone.Position = (position)
end
0
There is one more thing with this, when it gets to the end of the street it destroys the car, if I use your script will it clone the car when it’s broken or completely reset it so it’s like new PatrykWalat 4 — 3y
0
I will also try cloning it from Lighting using your script so that it spawns a new car not broken. I’ll mark your answer as answered for now as I’ll edit the code PatrykWalat 4 — 3y
Ad

Answer this question