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

Problems with Vehicle Regen Spawner?

Asked by 9 years ago

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

Log in to vote
0
Answered by 9 years ago

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

0
It's got to be the spawner, not the car. Solsist 0 — 9y
Ad
Log in to vote
0
Answered by 9 years ago

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.

Answer this question