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

How can I stop these joints from breaking?

Asked by 9 years ago

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

0
Store them anchored, makejoints, unanchor at the end? iaz3 190 — 9y
0
I'm not too experienced with custom NPCs, but are you using the new Motor6D's to link them? (if I'm not mistaken, two exist, though the new one is named "Motor" or something) RoboFrog 400 — 9y
0
I'm not at the computer to check, but I believe they use motors, not motor 6d LordTJcs 5 — 9y
0
Just checked. They use Motors located in the torso. LordTJcs 5 — 9y

Answer this question