Log in to vote

How can I make my horde of npcs spawn behind the player?

Asked by 22 days ago
Edited 22 days ago

So basically, I'm making an ability for a sword where you can spawn a horde of noobs behind the player that will move straight ahead. I'm having a problem, though. That problem is that I can't figure out how to make them properly spawn behind the player, because when they spawn, they dont go where i want it to (The npcs are inside a model) Instead, their torso stays in the same place, but their arms and legs go in the direction they should be facing, which looks really weird. If needed, i can elaborate. One more thing, the noobs are in a square formation. Thanks!

Here is the script:

local noobs = game.ServerStorage.Noobs

    local debounce = false
    local char = player.Character
    local sword = char:FindFirstChild("NoobSword")


    local Noob = noobs:Clone()
    Noob.Parent = workspace


    for i,v in pairs(Noob:GetChildren()) do
        if v.Name == "Noob" then
            v.HumanoidRootPart.Orientation = char.HumanoidRootPart.Orientation
            v.HumanoidRootPart.CFrame = v.HumanoidRootPart.CFrame *,-3,-20)
            v.HumanoidRootPart.Anchored = true
            v.CFrame = v.CFrame *,-3,-20)
            v.Orientation = char.HumanoidRootPart.Orientation

Answer this question