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

Problems with Vehicle Regen Spawner?

I have a Dialog ran Vehicle Spawner that should spawn in the car when you click on it's choice, but when you click it, it gives the entire server 4-6 seconds of massive lag before the car spawns in the workspace. I can't figure out at all what any of the problems are.

obj = {}

script.Parent.DialogChoiceSelected:connect(function(player, choice)
	for _,i in pairs (game.ServerStorage:GetChildren()) do
		if i.Name == choice.Name then
			table.insert(obj, i)
			local c = i:Clone()
			c.Parent = workspace
			c:MakeJoints()
		end
	end
end)

2 answers

Interesting, I'd suggest testing the script out many times and see when it lags.

1 comment

0

It's got to be the spawner, not the car.

Hello, iStormyKitty

I don't believe that their are any problems with the script, the only thing that could cause this is too many parts being spawned at once, my best advice to you is to union together some of the parts in the car.

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