Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to make a car respawn every 7 seconds?

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

1 comment

0

Damn so I help a lot of people and get banned, now no-one helps me

1 answer

✓ Accepted answer

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

2 comments

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

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

This discussion is preserved as it was. New answers, comments, and votes are closed.