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

how to place a part on a random location on another part?

Asked by 2 years ago
for i = 1,50 do
        wait(0.1)
        local uppertorso = player.Character.UpperTorso
        local rock = game.ReplicatedStorage.Armor.ground:Clone()
        rock.Parent = folder
        local weld = Instance.new("Weld")
        weld.Parent = folder
        weld.Part0 = player.Character.UpperTorso
        weld.Part1 = rock
        local pos = Vector3.new(math.random(-uppertorso.Size.x/2, uppertorso.Size.x/2), uppertorso.Size.y/2, math.random(-uppertorso.Size.z/2,uppertorso.Size.z/2))
        rock.CFrame = uppertorso.CFrame * CFrame.new(pos)
        rock.Orientation = rock.Orientation + Vector3.new(math.random(-360,360),math.random(-360,360),math.random(-360,360))
    end

so i did a little research to find out how and i have no idea what so ever what this is , is basically a rock armor on the player but i cant get it to cover the whole torso the part just go in the middle on the uppertorso

Answer this question