My problem is essentially this
wait() Wave = 1 print("Wave Loaded") function Create(item, amount, Xran1, Xran2, Zran1, Zran2, CPart, WaitTime) for i = 1, amount do if item then local Creation = game.ServerStorage.Instances[item] wait() local Instance = Creation:Clone() wait() Instance.Parent = game.Workspace.GameHolder wait() local xpos = math.random(Xran1, Xran2) local zpos = math.random(Zran1, Zran2) Instance[CPart].CFrame = CFrame.new(xpos,4,zpos) wait(0.05) wait(WaitTime) else print("Item is nil") end end end
whenever I use this function (It's for a modular wave script) the NPC's spawned have about an 85% chance of having all their joints broken, and I have no idea why. I've tried putting "Instance:MakeJoint()" after every single step, but it only made the problem worse. Any suggestions?
If it helps, this never happened before today, maybe a roblox update broke it... Edit: This also doesn't happen in offline Test mode, only when online does it happen