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

Humanoid Duplication Problems?

Asked by 9 years ago

Its the imfamas humanoid duplication problem, yay! Anyways to try to make this easier on you guys, only focus the humanoid duplication part (lines 13, 14, 15, and 16) . The problem is, every time the humanoid is duplicated, it immediatly dies (health==0). The script is located in the starterGUI service, and theres nothing wrong with the GUI part. If you are going to change the script up, only fix the parts that need fixing PLEASE.

player = game.Players.LocalPlayer
script.Parent.Parent.Adornee = workspace.Part
Var = 0
Var1 = 0

script.Parent.MouseButton1Click:connect(function()
    repeat wait() until player:FindFirstChild("team")
    local team = player:FindFirstChild("team")
    if team.Value == "red" then
        if Var == 0 then    
            Var = 1
            if Var1 <= 6 then
                local HumanoidDuplicate = workspace.ModelHumanoid:Clone()
                HumanoidDuplicate:MakeJoints()
                HumanoidDuplicate.Parent = workspace
                HumanoidDuplicate.Torso.Position = workspace.Part.Position + Vector3.new(0,5,0)
                Var1 = Var1 + 1
            end
            wait(.5)
            Var = 0
        end
    end
end)
0
Can you guess what game I'm trying to re-create using this script? It's a popular one! LateralLace 297 — 9y

Answer this question